diff options
| author | Russ Cox <rsc@golang.org> | 2011-02-01 18:34:41 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-02-01 18:34:41 -0500 |
| commit | 1fa41734441ba95f06171db25af7769f6ae26b30 (patch) | |
| tree | b89bde8ee3d0eb65fe626aec9dbdc9d74ae521a7 /src/pkg/runtime/proc.c | |
| parent | 80f07cfbeadb2c008827f6d6ce4ddd70d7cf0528 (diff) | |
| download | go-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.c | 6 |
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) |
