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.
With the -literals flag, we try to convert some const declarations to vars, as long as that doesn't break typechecking. We really only do that for typed constant strings, really. There was a quirk: if a numerical constant had a type and used iota, we would not obfuscate its value, but we would still convert the declaration from const to var. Since iotas only work within const declarations, that would break compilation: > garble -literals build [stderr] # test/main FeWE3zwi.go:19: undefined: iota exit status 2 To fix the problem, make the logic more conservative: only obfuscate constant declarations where the values are typed strings, meaning that any numerical constants are left entirely untouched. This fixes the build of google.golang.org/protobuf/runtime/protoiface with -literals turned on. |
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 | |
goprivate.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.txt | 4 years ago | |
syntax.txt | 4 years ago | |
test.txt | 4 years ago | |
tiny.txt | 4 years ago |