aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony Martin <ality@pbrane.org>2014-03-12 19:42:58 -0700
committerAnthony Martin <ality@pbrane.org>2014-03-12 19:42:58 -0700
commit64e041652aa2c431ff2aec6745dfecf32abac66a (patch)
treeac80cbf1c888e24288a8cc6018fe068f58eb4cf2 /src
parentb53d2f5ba7a09b60a3f3dda71a47149f41482290 (diff)
downloadgo-64e041652aa2c431ff2aec6745dfecf32abac66a.tar.xz
runtime: call symtabinit earlier
Otherwise, we won't get a stack trace in some of the early init. Here's one example: http://build.golang.org/log/a96d10f6aee1fa3e3ae51f41da46d414a7ab02de After walking the stack by hand in acid, I was able to determine that the stackalloc inside mpreinit was causing the throw. LGTM=rsc R=rsc, dvyukov CC=golang-codereviews https://golang.org/cl/72450044
Diffstat (limited to 'src')
-rw-r--r--src/pkg/runtime/proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index eb7dfe4f84..d3ad740136 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -146,6 +146,7 @@ runtime·schedinit(void)
runtime·sched.maxmcount = 10000;
runtime·precisestack = true; // haveexperiment("precisestack");
+ runtime·symtabinit();
runtime·mallocinit();
mcommoninit(m);
@@ -159,9 +160,6 @@ runtime·schedinit(void)
runtime·goenvs();
runtime·parsedebugvars();
- // Allocate internal symbol table representation now, we need it for GC anyway.
- runtime·symtabinit();
-
runtime·sched.lastpoll = runtime·nanotime();
procs = 1;
p = runtime·getenv("GOMAXPROCS");