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. |
4 years ago | |
|---|---|---|
| .. | ||
| asm.txt | 4 years ago | |
| basic.txt | 4 years ago | |
| cgo.txt | 4 years ago | |
| crossbuild.txt | 4 years ago | |
| debugdir.txt | 4 years ago | |
| embed.txt | 4 years ago | |
| gogarble.txt | 4 years ago | |
| goversion.txt | 4 years ago | |
| help.txt | 4 years ago | |
| implement.txt | 4 years ago | |
| imports.txt | 4 years ago | |
| init.txt | 4 years ago | |
| ldflags.txt | 4 years ago | |
| linkname.txt | 4 years ago | |
| literals.txt | 4 years ago | |
| modinfo.txt | 4 years ago | |
| plugin.txt | 4 years ago | |
| position.txt | 4 years ago | |
| reflect.txt | 4 years ago | |
| reverse.txt | 4 years ago | |
| seed-cache.txt | 4 years ago | |
| seed.txt | 4 years ago | |
| syntax.txt | 4 years ago | |
| test.txt | 4 years ago | |
| tiny.txt | 4 years ago | |