aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-02-01 18:34:41 -0500
committerRuss Cox <rsc@golang.org>2011-02-01 18:34:41 -0500
commit1fa41734441ba95f06171db25af7769f6ae26b30 (patch)
treeb89bde8ee3d0eb65fe626aec9dbdc9d74ae521a7 /src/pkg/runtime/proc.c
parent80f07cfbeadb2c008827f6d6ce4ddd70d7cf0528 (diff)
downloadgo-1fa41734441ba95f06171db25af7769f6ae26b30.tar.xz
5l, 8l: pass stack frame size to morestack when needed
Shame on me: I fixed the same bug in 6l in 8691fcc6a66e (https://golang.org/cl/2609041) and neglected to look at 5l and 8l to see if they were affected. On the positive side, the check I added in that CL is the one that detected this bug. Fixes #1457. R=ken2 CC=golang-dev https://golang.org/cl/3981052
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 62872d989c..998cbc7bc2 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -723,8 +723,10 @@ runtime·newstack(void)
argsize = m->moreargsize;
g1 = m->curg;
- if(m->morebuf.sp < g1->stackguard - StackGuard)
- runtime·throw("split stack overflow");
+ if(m->morebuf.sp < g1->stackguard - StackGuard) {
+ runtime·printf("runtime: split stack overflow: %p < %p\n", m->morebuf.sp, g1->stackguard - StackGuard);
+ runtime·throw("runtime: split stack overflow");
+ }
reflectcall = framesize==1;
if(reflectcall)