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

ensure the alignment of sync/atomic types works #702

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Mar 11, 2023

(see commit message)

Fixes #686.

@mvdan mvdan requested review from lu4p and pagran March 11, 2023 00:33
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
Copy link
Member Author

mvdan commented Mar 11, 2023

I forgot that darwin/386 and darwin/arm are not (or no longer)? supported. CI should be green now.

@mvdan mvdan merged commit 9d04637 into burrowers:master Mar 11, 2023
@mvdan mvdan deleted the atomic-compiler branch March 11, 2023 18:09
@Hoto-Cocoa
Copy link

Hi. Can I know when this patch will be released? I faced same issue and waiting this patch get released.

@mvdan
Copy link
Member Author

mvdan commented May 11, 2023

You can already do go install mvdan.cc/garble@master. We will do a release soon, but noone should be blocked by that.

@Hoto-Cocoa
Copy link

Thanks!

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.

garble 32-bit arm builds panic: unaligned 64-bit atomic operation
3 participants