Only Unix was resetting the traceback_cache variable
after initializing the environment. Reset it on all systems
by resetting in parsedebugvars.
Fixes #8813.
LGTM=adg, alex.brainman
R=golang-codereviews, adg, alex.brainman
CC=golang-codereviews, iant, r
https://golang.org/cl/
152760043
syscall·envs.array = (byte*)s;
syscall·envs.len = n;
syscall·envs.cap = n;
-
- traceback_cache = ~(uint32)0;
}
int32
{
byte *p;
intgo i, n;
+ bool tmp;
+
+ // gotraceback caches the GOTRACEBACK setting in traceback_cache.
+ // gotraceback can be called before the environment is available.
+ // traceback_cache must be reset after the environment is made
+ // available, in order for the environment variable to take effect.
+ // The code is fixed differently in Go 1.4.
+ // This is a limited fix for Go 1.3.3.
+ traceback_cache = ~(uint32)0;
+ runtime·gotraceback(&tmp);
p = runtime·getenv("GODEBUG");
if(p == nil)