You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
When a function definition is variadic, the number of parameters may not match the number of calling arguments. Our existing code was a bit naive with this edge case, leading to a panic when indexing call.Args. Keep track of that information, and properly handle all variadic arguments that may be used indirectly with reflection. We add a test case that used to panic, where 0 arguments are used for a variadic parameter, as well as a case where we need to disable obfuscation for a Go type used as the second variadic argument rather than the first. Finally, the old code in findReflectFunctions looked at Go function types from the point of view of go/ast.FuncType. Use go/types.Signature instead, where we don't need to deal with the grouping of variables in the original syntax, and which is more consistent with the rest of the garble codebase. Fixes #524. |
3 years ago | |
---|---|---|
.. | ||
asm.txt | 3 years ago | |
basic.txt | 3 years ago | |
cgo.txt | 3 years ago | |
crossbuild.txt | 3 years ago | |
debugdir.txt | 3 years ago | |
embed.txt | 3 years ago | |
gogarble.txt | 3 years ago | |
goversion.txt | 3 years ago | |
help.txt | 3 years ago | |
implement.txt | 3 years ago | |
imports.txt | 3 years ago | |
init.txt | 3 years ago | |
ldflags.txt | 3 years ago | |
linkname.txt | 3 years ago | |
literals.txt | 3 years ago | |
modinfo.txt | 3 years ago | |
plugin.txt | 3 years ago | |
position.txt | 3 years ago | |
reflect.txt | 3 years ago | |
reverse.txt | 3 years ago | |
seed-cache.txt | 3 years ago | |
seed.txt | 3 years ago | |
syntax.txt | 3 years ago | |
test.txt | 3 years ago | |
tiny.txt | 3 years ago |