Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only obfuscate literals in packages to obfuscate #428

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Dec 5, 2021

(see commit message)

Fixes #417.

Add a regression test in gogarble.txt,
as that test is already set up with packages to not obfuscate.

This bug manifested in the form of a build failure for GOOS=plan9
with -literals turned on:

	[...]/os/file_plan9.go:151:12: invalid operation: cannot call non-function append (variable of type bool)

In this case, the "os" package is not to be obfuscated,
but we would still obfuscate its literals as per the bug.

But, since the package's identifiers were not obfuscated,
names like "append" were not replaced as per ea2e0bd,
meaning that the shadowing would still affect us.

Fixes burrowers#417.
@mvdan
Copy link
Member Author

mvdan commented Dec 5, 2021

FYI @kortschak if you'd like to double-check, as I already got this wrong once.

@kortschak
Copy link
Contributor

That works here. Thanks.

@mvdan mvdan merged commit a144789 into burrowers:master Dec 6, 2021
@mvdan mvdan deleted the literals-gogarble branch December 11, 2021 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

plan9 builds broken on go1.18-b69b2f63d6 with garble @ 64cbbbaa
3 participants