aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-07-02 15:46:51 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-07-02 16:03:51 -0700
commitf35d86fd5febaa32a9a28b3a35bffaff43bc89bd (patch)
tree7b163c6f98a806ac72410bfa14aeef4fd42a012e /src/runtime
parentb994cc69e05d7821a08f75619f356ecfe5ca9b43 (diff)
parent912f0750472dd4f674b69ca1616bfaf377af1805 (diff)
downloadgo-f35d86fd5febaa32a9a28b3a35bffaff43bc89bd.tar.xz
[dev.typeparams] all: merge master (912f075) into dev.typeparams
Conflicts: - src/cmd/compile/internal/escape/escape.go On master, CL 332230 changed the ">=" in HeapAllocReason to ">"; but on dev.typeparams, CL 329989 moved HeapAllocReason into utils.go. Merge List: + 2021-07-02 912f075047 net/http: mention socks5 support in proxy + 2021-07-02 287c5e8066 cmd/compile: fix stack growing algorithm + 2021-07-02 743f03eeb0 spec, unsafe: clarify unsafe.Slice docs + 2021-07-02 6125d0c426 cmd/dist: correct comment: SysProcAttri -> SysProcAttr + 2021-07-01 03761ede02 net: don't reject null mx records + 2021-07-01 877688c838 testing: add TB.Setenv + 2021-07-01 ef8ae82b37 cmd/compile: fix bug in dwarf-gen var location generation + 2021-07-01 770899f7e1 cmd/go: add a regression test for 'go mod vendor' path traversal + 2021-07-01 835d86a17e cmd/go: use path.Dir instead of filepath.Dir for package paths in 'go mod vendor' + 2021-07-01 eb437ba92c cmd/compile: make stack value size threshold comparisons consistent + 2021-07-01 9d65578b83 cmd/compile: fix typos in document Change-Id: I08aa852441af0f070aa32dd2f99b6fa4e9d79cfa
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/stack.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index 1fa235bf86..54ad66dca2 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -1061,7 +1061,9 @@ func newstack() {
// recheck the bounds on return.)
if f := findfunc(gp.sched.pc); f.valid() {
max := uintptr(funcMaxSPDelta(f))
- for newsize-gp.sched.sp < max+_StackGuard {
+ needed := max + _StackGuard
+ used := gp.stack.hi - gp.sched.sp
+ for newsize-used < needed {
newsize *= 2
}
}