mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
cmd/internal/objabi, internal/runtime: increase nosplit limit on OpenBSD
OpenBSD is bumping up against the nosplit limit, and openbsd/ppc64 is over it. Increase StackGuardMultiplier on OpenBSD, matching AIX. Change-Id: I61e17c99ce77e1fd3f368159dc4615aeae99e913 Reviewed-on: https://go-review.googlesource.com/c/go/+/632996 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
ea86737810
commit
4da905bcf0
@ -20,8 +20,8 @@ func StackNosplit(race bool) int {
|
|||||||
func stackGuardMultiplier(race bool) int {
|
func stackGuardMultiplier(race bool) int {
|
||||||
// This arithmetic must match that in internal/runtime/sys/consts.go:StackGuardMultiplier.
|
// This arithmetic must match that in internal/runtime/sys/consts.go:StackGuardMultiplier.
|
||||||
n := 1
|
n := 1
|
||||||
// On AIX, a larger stack is needed for syscalls.
|
// On AIX and OpenBSD, a larger stack is needed for syscalls.
|
||||||
if buildcfg.GOOS == "aix" {
|
if buildcfg.GOOS == "aix" || buildcfg.GOOS == "openbsd" {
|
||||||
n += 1
|
n += 1
|
||||||
}
|
}
|
||||||
// The race build also needs more stack.
|
// The race build also needs more stack.
|
||||||
|
@ -9,10 +9,10 @@ import (
|
|||||||
"internal/goos"
|
"internal/goos"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AIX requires a larger stack for syscalls.
|
// AIX and OpenBSD require a larger stack for syscalls.
|
||||||
// The race build also needs more stack. See issue 54291.
|
// The race build also needs more stack. See issue 54291.
|
||||||
// This arithmetic must match that in cmd/internal/objabi/stack.go:stackGuardMultiplier.
|
// This arithmetic must match that in cmd/internal/objabi/stack.go:stackGuardMultiplier.
|
||||||
const StackGuardMultiplier = 1 + goos.IsAix + isRace
|
const StackGuardMultiplier = 1 + goos.IsAix + goos.IsOpenbsd + isRace
|
||||||
|
|
||||||
// DefaultPhysPageSize is the default physical page size.
|
// DefaultPhysPageSize is the default physical page size.
|
||||||
const DefaultPhysPageSize = goarch.DefaultPhysPageSize
|
const DefaultPhysPageSize = goarch.DefaultPhysPageSize
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// run
|
// run
|
||||||
|
|
||||||
//go:build !nacl && !js && !aix && !wasip1 && !gcflags_noopt && gc
|
//go:build !nacl && !js && !aix && !openbsd && !wasip1 && !gcflags_noopt && gc
|
||||||
|
|
||||||
// Copyright 2014 The Go Authors. All rights reserved.
|
// Copyright 2014 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
Loading…
x
Reference in New Issue
Block a user