r267658 - in /trunk: gcc/go/gofrontend/MERGE li...
ian@gcc.gnu.org
ian@gcc.gnu.org
Mon Jan 7 20:12:00 GMT 2019
Author: ian
Date: Mon Jan 7 20:12:39 2019
New Revision: 267658
URL: https://gcc.gnu.org/viewcvs?rev=267658&root=gcc&view=rev
Log:
runtime: in getTraceback, set gp->m before gogo
Currently, when collecting a traceback for another goroutine,
getTraceback calls gogo(gp) switching to gp, which will resume in
mcall, which will call gtraceback, which will set up gp->m. There
is a gap between setting the current running g to gp and setting
gp->m. If a profiling signal arrives in between, sigtramp will
see a non-nil gp with a nil m, and will seg fault. Fix this by
setting up gp->m first.
Fixes golang/go#29448.
Reviewed-on: https://go-review.googlesource.com/c/156038
Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/libgo/go/runtime/pprof/pprof_test.go
trunk/libgo/runtime/proc.c
More information about the Gcc-cvs
mailing list