-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
garble 32-bit arm builds panic: unaligned 64-bit atomic operation #686
Comments
Same issue here |
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Mar 11, 2023
Added in Go 1.19, types like sync/atomic.Uint64 are handy, because they ensure proper alignment even on 32-bit GOOSes. However, this was done via a magic `type align64 struct{}`, which the compiler spotted by name. To keep that magic working, do not obfuscate the name. Neither package path was being obfuscated, as both packages contain compiler intrinsics already. Fixes burrowers#686.
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Mar 11, 2023
Added in Go 1.19, types like sync/atomic.Uint64 are handy, because they ensure proper alignment even on 32-bit GOOSes. However, this was done via a magic `type align64 struct{}`, which the compiler spotted by name. To keep that magic working, do not obfuscate the name. Neither package path was being obfuscated, as both packages contain compiler intrinsics already. Fixes burrowers#686.
mvdan
added a commit
that referenced
this issue
Mar 11, 2023
Added in Go 1.19, types like sync/atomic.Uint64 are handy, because they ensure proper alignment even on 32-bit GOOSes. However, this was done via a magic `type align64 struct{}`, which the compiler spotted by name. To keep that magic working, do not obfuscate the name. Neither package path was being obfuscated, as both packages contain compiler intrinsics already. Fixes #686.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
Given a basic http server,
What did you expect to see?
The program when compiled with go works fine.
What did you see instead?
Replacing this with output from
garble reverse
gives:It appears that building using garble is somehow breaking the alignment of 64 bit types when running on 32 bit architecture.
Cause Speculation
It seems that in go/src/atomic/type.go, maybe the Uint64 struct is losing its alignment instruction due to garble.
the garble build debug output has a line that seems to indicate this:
The text was updated successfully, but these errors were encountered: