From 575eb8f58b06657c9cadfe6f7ddfd9e530fe5dea Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 7 Jan 2019 20:12:39 +0000 Subject: 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 From-SVN: r267658 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/go/gofrontend') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 3484583..d6fe5f6 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -2ce291eaee427799bfcde256929dab89e0ab61eb +c257303eaef143663216e483857d5b259e05753f The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1