diff options
Diffstat (limited to 'src/pkg/runtime/stack.c')
| -rw-r--r-- | src/pkg/runtime/stack.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index dda65f9463..b959eb316d 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -246,6 +246,8 @@ runtime·newstack(void) runtime·throw("runtime: preempt g0"); if(oldstatus == Grunning && m->p == nil) runtime·throw("runtime: g is running but p is not"); + if(oldstatus == Gsyscall && m->locks == 0) + runtime·throw("runtime: stack split during syscall"); // Be conservative about where we preempt. // We are interested in preempting user Go code, not runtime code. if(oldstatus != Grunning || m->locks || m->mallocing || m->gcing || m->p->status != Prunning) { |
