]> Cypherpunks repositories - gostls13.git/commit
runtime: fix stackCache=0 debug mode
authorAustin Clements <austin@google.com>
Thu, 18 May 2017 18:35:53 +0000 (14:35 -0400)
committerAustin Clements <austin@google.com>
Tue, 23 May 2017 20:11:18 +0000 (20:11 +0000)
commit475425201a735762bccbc77d00b00a799d425a9f
treeb7d475b19e17eea188dabc32010d7dd4e13071ba
parent8a1c5b2e486be7a2df7667582a1b8cd53c8c7745
runtime: fix stackCache=0 debug mode

Setting stackCache to 0 to disable stack caches for debugging hasn't
worked for a long time. It causes stackalloc to fall back to full span
allocation, round sub-page stacks down to 0 pages, and blow up.

Fix this debug mode so it disables the per-P caches, but continues to
use the global stack pools for small stacks, which correctly handle
sub-page stacks. While we're here, rename stackCache to stackNoCache
so it acts like the rest of the stack allocator debug modes where "0"
is the right default value.

Fixes #17291.

Change-Id: If401c41cee3448513cbd7bb2e9334a8efab257a7
Reviewed-on: https://go-review.googlesource.com/43637
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/stack.go