From 12308d5a0bb424ef3ee9a664c77192b48e3df84c Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Tue, 30 Sep 2014 19:34:33 +0400 Subject: [PATCH] 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 --- src/runtime/stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.51.0