From ab30553bb28c9f311a9179e1e95b635b059e7c69 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Tue, 30 Sep 2014 19:34:33 +0400 Subject: runtime: fix throwsplit check Newstack runs on g0, g0->throwsplit is never set. LGTM=rsc R=rsc CC=golang-codereviews, khr https://codereview.appspot.com/147370043 --- src/runtime/stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/stack.c') diff --git a/src/runtime/stack.c b/src/runtime/stack.c index 2d23c717b..8562b9407 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, -- cgit v1.2.1