]> Cypherpunks repositories - gostls13.git/commit
cmd/gc, runtime: fix race, nacl for writebarrier changes
authorRuss Cox <rsc@golang.org>
Wed, 15 Oct 2014 03:24:32 +0000 (23:24 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 15 Oct 2014 03:24:32 +0000 (23:24 -0400)
commitff6d0a4df44b24b71df1cfbd29534f54a4b2de17
tree6461474d72a76944e2cb07aefd41b67c483ebd8c
parentae250ab227311aab7fd8dff22ae05592abd13bde
cmd/gc, runtime: fix race, nacl for writebarrier changes

The racewalk code was not updated for the new write barriers.
Make it more future-proof.

The new write barrier code assumed that +1 pointer would
be aligned properly for any type that might follow, but that's
not true on 32-bit systems where some types are 64-bit aligned.
The only system like that today is nacl/amd64p32.
Insert a dummy pointer so that the ambiguously typed
value is at +2 pointers, which is always max-aligned.

LGTM=r
R=r
CC=golang-codereviews, iant, khr
https://golang.org/cl/158890046
src/cmd/gc/builtin.c
src/cmd/gc/racewalk.c
src/cmd/gc/runtime.go
src/cmd/gc/walk.c
src/runtime/mgc0.go