aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime1.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/runtime1.go')
-rw-r--r--src/runtime/runtime1.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
index b0a458d187..a29608329c 100644
--- a/src/runtime/runtime1.go
+++ b/src/runtime/runtime1.go
@@ -355,6 +355,8 @@ var dbgvars = []dbgVar{
{"adaptivestackstart", &debug.adaptivestackstart},
}
+var globalGODEBUG string
+
func parsedebugvars() {
// defaults
debug.cgocheck = 1
@@ -372,7 +374,9 @@ func parsedebugvars() {
debug.madvdontneed = 1
}
- for p := gogetenv("GODEBUG"); p != ""; {
+ globalGODEBUG = gogetenv("GODEBUG")
+ godebugenv.StoreNoWB(&globalGODEBUG)
+ for p := globalGODEBUG; p != ""; {
field := ""
i := bytealg.IndexByteString(p, ',')
if i < 0 {