aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/proc.go1
-rw-r--r--src/runtime/runtime.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index a7a3fb62cb..538ed0a282 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -775,6 +775,7 @@ func schedinit() {
}
sched.maxmcount = 10000
+ crashFD.Store(^uintptr(0))
// The world starts stopped.
worldStopped()
diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go
index 4dfb2f840a..c7a511b2a4 100644
--- a/src/runtime/runtime.go
+++ b/src/runtime/runtime.go
@@ -244,6 +244,8 @@ func writeErrData(data *byte, n int32) {
// set by debug.SetCrashOutput (see #42888). If it is a valid fd (not
// all ones), writeErr and related functions write to it in addition
// to standard error.
+//
+// Initialized to -1 in schedinit.
var crashFD atomic.Uintptr
//go:linkname setCrashFD