diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index d580665e2b..81005de5d7 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -776,6 +776,8 @@ runtime·shrinkstack(G *gp) uintptr used, oldsize, newsize; MSpan *span; + if(!runtime·copystack) + return; oldstk = (byte*)gp->stackguard - StackGuard; oldbase = (byte*)gp->stackbase + sizeof(Stktop); oldsize = oldbase - oldstk;