Skip to content

Commit 4f45424

Browse files
prattmicheschi
authored andcommitted
[release-branch.go1.18] 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. For #51776. Fixes #52305. 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]> (cherry-picked from commit ea7e3e3) Reviewed-on: https://go-review.googlesource.com/c/go/+/399954 Run-TryBot: Michael Pratt <[email protected]>
1 parent 13bda0e commit 4f45424

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
@@ -514,6 +514,7 @@ type m struct {
514514
g0 *g // goroutine with scheduling stack
515515
morebuf gobuf // gobuf arg to morestack
516516
divmod uint32 // div/mod denominator for arm - known to liblink
517+
_ uint32 // align next field to 8 bytes
517518

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

0 commit comments

Comments
 (0)