MCPcopy Create free account
hub / github.com/maruel/panicparse / rerunWithFastCrash

Function rerunWithFastCrash

cmd/panic/main.go:127–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127func rerunWithFastCrash() {
128 if os.Getenv("GORACE") != "log_path=stderr halt_on_error=1" {
129 _ = os.Setenv("GORACE", "log_path=stderr halt_on_error=1")
130 /* #nosec G204 */
131 c := exec.Command(os.Args[0], os.Args[1:]...)
132 c.Stderr = os.Stderr
133 if err, ok := c.Run().(*exec.ExitError); ok {
134 if status, ok := err.Sys().(syscall.WaitStatus); ok {
135 os.Exit(status.ExitStatus())
136 }
137 os.Exit(1)
138 }
139 os.Exit(0)
140 }
141}
142
143// panicDoRaceWrite and panicDoRaceRead are extracted from panicRace() to make
144// the stack trace less trivial, but in general folks will do the error with

Callers 1

panicRaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…