From: Dmitriy Vyukov Date: Tue, 30 Sep 2014 15:34:33 +0000 (+0400) Subject: runtime: fix throwsplit check X-Git-Tag: go1.4beta1~243 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=12308d5a0bb424ef3ee9a664c77192b48e3df84c;p=gostls13.git runtime: fix throwsplit check Newstack runs on g0, g0->throwsplit is never set. LGTM=rsc R=rsc CC=golang-codereviews, khr https://golang.org/cl/147370043 --- diff --git a/src/runtime/stack.c b/src/runtime/stack.c index 2d23c717bd..8562b94076 100644 --- a/src/runtime/stack.c +++ b/src/runtime/stack.c @@ -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,