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

<a id="c1"></a>Comment 1: #42294

Closed
Cherrison opened this issue Oct 30, 2020 · 1 comment
Closed

<a id="c1"></a>Comment 1: #42294

Cherrison opened this issue Oct 30, 2020 · 1 comment

Comments

@Cherrison
Copy link

why 64-bit atomic operation must make sure the
pointer address is aligned to 8-byte boundary?

Comment 1:

The caller of 64-bit atomic operation must make sure the
pointer address is aligned to 8-byte boundary.
http://play.golang.org/p/fRMRT2Jzsh
Quote BUGS section of docs for sync/atomic:
BUGS
   On x86-32, the 64-bit functions use instructions unavailable before the
   Pentium MMX. On both ARM and x86-32, it is the caller's responsibility to
   arrange for 64-bit alignment of 64-bit words accessed atomically. The
   first word in a global variable or in an allocated struct or slice can be
   relied upon to be 64-bit aligned.

Status changed to WorkingAsIntended.

Originally posted by @minux in #5278 (comment)

@ALTree
Copy link
Member

ALTree commented Oct 30, 2020

Hi,

the Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.

Please see the Questions wiki page; it has a list of good places for asking questions. Thanks!

Closing here, since this is not a bug.

@ALTree ALTree closed this as completed Oct 30, 2020
@golang golang locked and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants