Commit 12308d5a authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

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
parent 70b2da98
...@@ -695,7 +695,7 @@ runtime·newstack(void) ...@@ -695,7 +695,7 @@ runtime·newstack(void)
runtime·traceback(morebuf.pc, morebuf.sp, morebuf.lr, morebuf.g); runtime·traceback(morebuf.pc, morebuf.sp, morebuf.lr, morebuf.g);
runtime·throw("runtime: wrong goroutine in newstack"); runtime·throw("runtime: wrong goroutine in newstack");
} }
if(g->throwsplit) if(g->m->curg->throwsplit)
runtime·throw("runtime: stack split at bad time"); runtime·throw("runtime: stack split at bad time");
// The goroutine must be executing in order to call newstack, // The goroutine must be executing in order to call newstack,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment