aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/proc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 55c58442ba..d65f605bd6 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -363,9 +363,8 @@ checkmcount(void)
static void
mcommoninit(M *mp)
{
- // If there is no mcache runtime·callers() will crash,
- // and we are most likely in sysmon thread so the stack is senseless anyway.
- if(g->m->mcache)
+ // g0 stack won't make sense for user (and is not necessary unwindable).
+ if(g != g->m->g0)
runtime·callers(1, mp->createstack, nelem(mp->createstack));
mp->fastrand = 0x49f6428aUL + mp->id + runtime·cputicks();