]> Cypherpunks repositories - gostls13.git/commit
runtime: make gcTestMoveStackOnNextCall not double the stack
authorAustin Clements <austin@google.com>
Thu, 1 Apr 2021 20:50:53 +0000 (16:50 -0400)
committerAustin Clements <austin@google.com>
Fri, 2 Apr 2021 01:14:00 +0000 (01:14 +0000)
commit97b3ce430bb64fb6c8dfb244d400468932f2e984
tree0ce6262c65078d3eef3636ea37642907ffc327dd
parent41e8a9f1cf78933ebdaf9fa29694df5129f1862c
runtime: make gcTestMoveStackOnNextCall not double the stack

Currently, gcTestMoveStackOnNextCall doubles the stack allocation on
each call because stack movement always doubles the stack. That's
rather unfortunate if you're doing a bunch of stack movement tests in
a row that don't actually have to grow the stack because you'll
quickly hit the stack size limit even though you're hardly using any
of the stack.

Fix this by adding a special stack poison value for
gcTestMoveStackOnNextCall that newstack recognizes and inhibits the
allocation doubling.

Change-Id: Iace7055a0f33cb48dc97b8f4b46e45304bee832c
Reviewed-on: https://go-review.googlesource.com/c/go/+/306672
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/runtime/gc_test.go
src/runtime/mgc.go
src/runtime/stack.go