summaryrefslogtreecommitdiff
path: root/src/runtime/stack.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-09-30 19:34:33 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-09-30 19:34:33 +0400
commitab30553bb28c9f311a9179e1e95b635b059e7c69 (patch)
treee0eabdfc4d88a0ca92a710821f749784600ba9bd /src/runtime/stack.c
parent099b7bd40ceb990816cb6495ab8f2fa3f1ee8a6b (diff)
downloadgo-ab30553bb28c9f311a9179e1e95b635b059e7c69.tar.gz
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
Diffstat (limited to 'src/runtime/stack.c')
-rw-r--r--src/runtime/stack.c2
1 files changed, 1 insertions, 1 deletions
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,