diff --git a/src/cmd/compile/internal/ssagen/nowb.go b/src/cmd/compile/internal/ssagen/nowb.go index b8756eea61..8e776695e3 100644 --- a/src/cmd/compile/internal/ssagen/nowb.go +++ b/src/cmd/compile/internal/ssagen/nowb.go @@ -174,6 +174,14 @@ func (c *nowritebarrierrecChecker) check() { fmt.Fprintf(&err, "\n\t%v: called by %v", base.FmtPos(call.lineno), call.target.Nname) call = funcs[call.target] } + // Seeing this error in a failed CI run? It indicates that + // a function in the runtime package marked nowritebarrierrec + // (the outermost stack element) was found, by a static + // reachability analysis over the fully lowered optimized code, + // to call a function (fn) that involves a write barrier. + // + // Even if the call path is infeasable, + // you will need to reorganize the code to avoid it. base.ErrorfAt(fn.WBPos, 0, "write barrier prohibited by caller; %v%s", fn.Nname, err.String()) continue } diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 122fc30df2..ff9c64113f 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -1014,13 +1014,12 @@ func sync_fatal(s string) { // issue #67274, so as to fix longtest builders. // //go:nosplit -//go:noinline func throw(s string) { // Everything throw does should be recursively nosplit so it // can be called even when it's unsafe to grow the stack. systemstack(func() { print("fatal error: ") - printpanicval(s) + printindented(s) // logically printpanicval(s), but avoids convTstring write barrier print("\n") }) @@ -1041,7 +1040,7 @@ func fatal(s string) { // can be called even when it's unsafe to grow the stack. systemstack(func() { print("fatal error: ") - printpanicval(s) + printindented(s) // logically printpanicval(s), but avoids convTstring write barrier print("\n") })