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.
garble/testdata/scripts
Daniel Martí 20ff64128e make KnownReflectAPIs aware of variadic funcs
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 all: drop support for Go 1.17 3 years ago
basic.txt all: drop support for Go 1.17 3 years ago
cgo.txt all: drop support for Go 1.17 3 years ago
crossbuild.txt all: drop support for Go 1.17 3 years ago
debugdir.txt all: drop support for Go 1.17 3 years ago
embed.txt all: drop support for Go 1.17 3 years ago
gogarble.txt all: drop support for Go 1.17 3 years ago
goversion.txt all: drop support for Go 1.17 3 years ago
help.txt make "garble version" include VCS information 3 years ago
implement.txt all: drop support for Go 1.17 3 years ago
imports.txt Fix removing named imports and fix removing imports with init() methods 3 years ago
init.txt all: drop support for Go 1.17 3 years ago
ldflags.txt all: drop support for Go 1.17 3 years ago
linkname.txt all: drop support for Go 1.17 3 years ago
literals.txt all: drop support for Go 1.17 3 years ago
modinfo.txt all: drop support for Go 1.17 3 years ago
plugin.txt all: drop support for Go 1.17 3 years ago
position.txt all: drop support for Go 1.17 3 years ago
reflect.txt make KnownReflectAPIs aware of variadic funcs 3 years ago
reverse.txt all: drop support for Go 1.17 3 years ago
seed-cache.txt all: drop support for Go 1.17 3 years ago
seed.txt all: drop support for Go 1.17 3 years ago
syntax.txt all: drop support for Go 1.17 3 years ago
test.txt all: drop support for Go 1.17 3 years ago
tiny.txt all: drop support for Go 1.17 3 years ago