Closed
Description
What version of Go are you using (go version
)?
tip (6797b32)
Does this issue reproduce with the latest release?
No.
What operating system and processor architecture are you using (go env
)?
linux/arm64
What did you do?
CL https://go-review.googlesource.com/c/go/+/138675/ adds race detector support to Linux/ARM64. But when I try to enable the race detector tests in cmd/dist (therefore all.bash), as in CL https://go-review.googlesource.com/c/go/+/149967, it doesn't pass. Similar failures are seen when running race.bash on Linux/ARM64.
##### Testing race detector
ok runtime/race 30.416s
ok flag 1.059s
ok net 1.221s
ok os 1.136s
ok os/exec 3.118s
ok encoding/gob 1.062s
runtime: frame sync/atomic.StoreUint32 untyped args 0x40001626b0+0xffffffff80000000
fatal error: missing stackmap
runtime stack:
runtime.throw(0x667912, 0x10)
/workdir/go/src/runtime/panic.go:608 +0x54 fp=0xffff6b7fe310 sp=0xffff6b7fe2e0 pc=0x4400a4
runtime.getStackMap(0xffff6b7fe510, 0xffff6b7fe650, 0x6ff101, 0x17, 0x6ff138, 0x17, 0xffff6b7fe458, 0x0, 0x0, 0x0)
/workdir/go/src/runtime/stack.go:1269 +0x4f8 fp=0xffff6b7fe3f0 sp=0xffff6b7fe310 pc=0x45ac08
runtime.adjustframe(0xffff6b7fe510, 0xffff6b7fe638, 0x812020)
/workdir/go/src/runtime/stack.go:628 +0x64 fp=0xffff6b7fe4b0 sp=0xffff6b7fe3f0 pc=0x458ff4
runtime.tracebackdefers(0x4000001680, 0x673010, 0xffff6b7fe638)
/workdir/go/src/runtime/traceback.go:77 +0x90 fp=0xffff6b7fe570 sp=0xffff6b7fe4b0 pc=0x462fb0
runtime.adjustdefers(0x4000001680, 0xffff6b7fe638)
/workdir/go/src/runtime/stack.go:723 +0x3c fp=0xffff6b7fe5a0 sp=0xffff6b7fe570 pc=0x4592ec
runtime.copystack(0x4000001680, 0x1000, 0x1)
/workdir/go/src/runtime/stack.go:868 +0x10c fp=0xffff6b7fe760 sp=0xffff6b7fe5a0 pc=0x45969c
runtime.newstack()
/workdir/go/src/runtime/stack.go:1050 +0x264 fp=0xffff6b7fe900 sp=0xffff6b7fe760 pc=0x459aa4
runtime.morestack()
/workdir/go/src/runtime/asm_arm64.s:310 +0x70 fp=0xffff6b7fe900 sp=0xffff6b7fe900 pc=0x46c9a0
...
exit status 2
FAIL _/workdir/go/misc/cgo/test 2.564s
2018/11/17 18:45:18 Failed: exit status 1
ok flag 1.037s
ok os/exec 3.104s
When using the race detector, sync/atomic.StoreUint32
and other sync/atomic functions are functions whose definitions and declarations are not in the same package, which therefore don't have implicit arg maps. It fails when those functions are called in defer statement.