]> Cypherpunks repositories - gostls13.git/commit
sync/atomic: clarify 64-bit alignment bug
authorAustin Clements <austin@google.com>
Tue, 11 Jul 2017 15:03:36 +0000 (11:03 -0400)
committerAustin Clements <austin@google.com>
Tue, 11 Jul 2017 18:32:38 +0000 (18:32 +0000)
commitfea7c43ea238d8e18f3bafaac2740b3fa8975ae5
tree91e5ba1461cbf8f8d70f9efe46caf02fad2d20e6
parent58ae050055ef00b97f1119e042fe7b459b20e839
sync/atomic: clarify 64-bit alignment bug

Local variables can also be relied on the be 64-bit aligned, since
they will be escaped to the heap if used with any atomic operations.

Also, allocated arrays are also aligned, just like structs and slices.

Fixes #18955.

Change-Id: I8a1897f6ff78922c8bfcf20d6eb4bcb17a70ba2d
Reviewed-on: https://go-review.googlesource.com/48112
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/sync/atomic/doc.go