No need to change to Grunnable state.
Add some more checks for Grunning state.
R=golang-dev, rsc, khr, dvyukov
CC=golang-dev
https://golang.org/cl/
10186045
case Gdead:
break;
case Grunning:
- if(gp != g)
+ if(gp != m->curg)
runtime·throw("mark - world not stopped");
+ if(g != m->g0)
+ runtime·throw("gc not on g0");
addstackroots(gp);
break;
case Grunnable:
static void
mgc(G *gp)
{
- gp->status = Grunnable;
gc(gp->param);
- gp->status = Grunning;
gp->param = nil;
runtime·gogo(&gp->sched);
}