r249138 - in /trunk: gcc/go/gofrontend/MERGE li...
ian@gcc.gnu.org
ian@gcc.gnu.org
Mon Jun 12 23:14:00 GMT 2017
Author: ian
Date: Mon Jun 12 23:14:05 2017
New Revision: 249138
URL: https://gcc.gnu.org/viewcvs?rev=249138&root=gcc&view=rev
Log:
runtime: ignore _Gscan bit when checking status in CgocallDone
Also always access the atomicstatus field atomically.
The effect of not checking the _Gscan bit is that if the GC decides to
scan the stack just as the goroutine is leaving the system call, the
goroutine might fail to call exitsyscall. Then then typically causes
a runtime assertion failure later on. If we do call exitsyscall as we
should, it will stall (in casgstatus) until the _Gscan bit is cleared.
No separate test. I've observed causing sporadic failures running the
misc/cgo tests, but we don't currently have a way to run those
routinely for gccgo. I should fix that.
Reviewed-on: https://go-review.googlesource.com/45392
Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/libgo/go/runtime/cgo_gccgo.go
trunk/libgo/go/runtime/proc.go
More information about the Gcc-cvs
mailing list