Skip to content

Commit ea7e3e3

Browse files
committed
runtime: align m.procid to 8 bytes on 32-bit systems
https://go-review.googlesource.com/c/go/+/383434 started using atomic Load64 on this field, which breaks 32 bit platforms which require 64-bit alignment of uint64s that are passed to atomic operations. Not sure why this doesn't break everywhere, but I saw it break on my laptop during all.bash. Change-Id: Ida27b23068b3cc7208fce3c97b69a464ccf68209 Reviewed-on: https://go-review.googlesource.com/c/go/+/399754 Run-TryBot: Keith Randall <[email protected]> Reviewed-by: Michael Pratt <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Keith Randall <[email protected]>
1 parent 11c450f commit ea7e3e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/runtime2.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ type m struct {
516516
g0 *g // goroutine with scheduling stack
517517
morebuf gobuf // gobuf arg to morestack
518518
divmod uint32 // div/mod denominator for arm - known to liblink
519+
_ uint32 // align next field to 8 bytes
519520

520521
// Fields not known to debuggers.
521522
procid uint64 // for debuggers, but offset not hard-coded

0 commit comments

Comments
 (0)