$ go build -a -gcflags=-l=4 runtime
# runtime
../src/runtime/proc.go:1655:10: write barrier prohibited by caller; oneNewExtraM
/home/mdempsky/wd/go/src/runtime/proc.go:1618:16: called by newextram
/home/mdempsky/wd/go/src/runtime/proc.go:1200:11: called by mstart1
/home/mdempsky/wd/go/src/runtime/proc.go:1170:9: called by mstart
It's complaining about the mp.curg = gp asignment in oneNewExtraM. This is a pointer assignment, and type runtime.g is not labeled go:notinheap.
mstart is labeled go:nowritebarrierrec, and none of mstart1, newextram, or oneNewExtraM are labeled go:yeswritebarrierrec.
I suspect there's also a compiler bug here that this isn't being detected at -l=0, but filing as a runtime bug first for investigation.
/cc @aclements
It's complaining about the
mp.curg = gpasignment in oneNewExtraM. This is a pointer assignment, and typeruntime.gis not labeledgo:notinheap.mstart is labeled
go:nowritebarrierrec, and none of mstart1, newextram, or oneNewExtraM are labeledgo:yeswritebarrierrec.I suspect there's also a compiler bug here that this isn't being detected at -l=0, but filing as a runtime bug first for investigation.
/cc @aclements