aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2022-11-16 12:56:40 -0800
committerKeith Randall <khr@google.com>2022-11-18 16:26:25 +0000
commit893964b9727a3dfcadab75c0f6b3c6b683b9bae0 (patch)
tree612af6c8419229681102fa682c18000e84f5701d /src/cmd/link
parente18d07ddc5c9005738c3063130f0f5ccf127849e (diff)
downloadgo-893964b9727a3dfcadab75c0f6b3c6b683b9bae0.tar.xz
runtime,cmd/link: increase stack guard space when building with -race
More stuff to do = more stack needed. Bump up the guard space when building with the race detector. Fixes #54291 Change-Id: I701bc8800507921bed568047d35b8f49c26e7df7 Reviewed-on: https://go-review.googlesource.com/c/go/+/451217 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/cmd/link')
-rw-r--r--src/cmd/link/internal/ld/stackcheck.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ld/stackcheck.go b/src/cmd/link/internal/ld/stackcheck.go
index f0e1367068..c82dafe51e 100644
--- a/src/cmd/link/internal/ld/stackcheck.go
+++ b/src/cmd/link/internal/ld/stackcheck.go
@@ -61,7 +61,7 @@ func (ctxt *Link) doStackCheck() {
// The call to morestack in every splittable function ensures
// that there are at least StackLimit bytes available below SP
// when morestack returns.
- limit := objabi.StackLimit - sc.callSize
+ limit := objabi.StackLimit(*flagRace) - sc.callSize
if buildcfg.GOARCH == "arm64" {
// Need an extra 8 bytes below SP to save FP.
limit -= 8