]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix throwsplit check
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 30 Sep 2014 15:34:33 +0000 (19:34 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 30 Sep 2014 15:34:33 +0000 (19:34 +0400)
Newstack runs on g0, g0->throwsplit is never set.

LGTM=rsc
R=rsc
CC=golang-codereviews, khr
https://golang.org/cl/147370043

src/runtime/stack.c

index 2d23c717bd75cb467de710cd8a566f9ccad515a6..8562b94076c4ba8b950c05402bd96fdd29849905 100644 (file)
@@ -695,7 +695,7 @@ runtime·newstack(void)
                runtime·traceback(morebuf.pc, morebuf.sp, morebuf.lr, morebuf.g);
                runtime·throw("runtime: wrong goroutine in newstack");
        }
-       if(g->throwsplit)
+       if(g->m->curg->throwsplit)
                runtime·throw("runtime: stack split at bad time");
 
        // The goroutine must be executing in order to call newstack,