aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stack.h
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-03-07 20:52:29 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-03-07 20:52:29 +0400
commit1a89e6388c3f1994da17a1d91a45920663db2af5 (patch)
treeb17c5bed1b1bee0e888c4f1e803019a22960c4a2 /src/pkg/runtime/stack.h
parentf946a7ca0971027a71e057c2650fdf63d54543e8 (diff)
downloadgo-1a89e6388c3f1994da17a1d91a45920663db2af5.tar.xz
runtime: refactor and fix stack management code
There are at least 3 bugs: 1. g->stacksize accounting is broken during copystack/shrinkstack 2. stktop->free is not properly maintained during copystack/shrinkstack 3. stktop->free logic is broken: we can have stktop->free==FixedStack, and we will free it into stack cache, but it actually comes from heap as the result of non-copying segment shrink This shows as at least spurious races on race builders (maybe something else as well I don't know). The idea behind the refactoring is to consolidate stacksize and segment origin logic in stackalloc/stackfree. Fixes #7490. LGTM=rsc, khr R=golang-codereviews, rsc, khr CC=golang-codereviews https://golang.org/cl/72440043
Diffstat (limited to 'src/pkg/runtime/stack.h')
-rw-r--r--src/pkg/runtime/stack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/stack.h b/src/pkg/runtime/stack.h
index 5175b98080..df965e1587 100644
--- a/src/pkg/runtime/stack.h
+++ b/src/pkg/runtime/stack.h
@@ -102,7 +102,7 @@ enum {
// The assumed size of the top-of-stack data block.
// The actual size can be smaller than this but cannot be larger.
// Checked in proc.c's runtime.malg.
- StackTop = 96,
+ StackTop = 88,
};
// Goroutine preemption request.