diff options
Diffstat (limited to 'src/runtime/stack.c')
| -rw-r--r-- | src/runtime/stack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/stack.c b/src/runtime/stack.c index 0d8814731c..2d23c717bd 100644 --- a/src/runtime/stack.c +++ b/src/runtime/stack.c @@ -827,7 +827,9 @@ runtime·shrinkstack(G *gp) if(used >= oldsize / 4) return; // still using at least 1/4 of the segment. - if(gp->syscallsp != 0) // TODO: can we handle this case? + // We can't copy the stack if we're in a syscall. + // The syscall might have pointers into the stack. + if(gp->syscallsp != 0) return; #ifdef GOOS_windows |
