aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/6l
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-10-20 12:16:39 -0700
committerRuss Cox <rsc@golang.org>2010-10-20 12:16:39 -0700
commitc2b91d4889cf50abda0d55483f44f2d2cd5c5ad4 (patch)
treea994d95a79a3c0ad89569888b40c69ab143c6d90 /src/cmd/6l
parent4ae93111749aed9b14e9926708dd08a099ab34ea (diff)
downloadgo-c2b91d4889cf50abda0d55483f44f2d2cd5c5ad4.tar.xz
6l: correct logic for morestack choice
The frame that gets allocated is for both the args and the autos. If together they exceed the default frame size, we need to tell morestack about both so that it allocates a large enough frame. Sanity check stack pointer in morestack to catch similar bugs. R=ken2 CC=golang-dev https://golang.org/cl/2609041
Diffstat (limited to 'src/cmd/6l')
-rw-r--r--src/cmd/6l/pass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/6l/pass.c b/src/cmd/6l/pass.c
index a2a82a18b5..8dc0ed551b 100644
--- a/src/cmd/6l/pass.c
+++ b/src/cmd/6l/pass.c
@@ -469,7 +469,7 @@ dostkoff(void)
/* 160 comes from 3 calls (3*8) 4 safes (4*8) and 104 guard */
moreconst1 = 0;
- if(autoffset+160 > 4096)
+ if(autoffset+160+textarg > 4096)
moreconst1 = (autoffset+160) & ~7LL;
moreconst2 = textarg;