From: Mauri de Souza Meneguzzo Date: Sun, 13 Aug 2023 14:04:53 +0000 (+0000) Subject: runtime: mark traceEnabled and traceShuttingDown as no:split X-Git-Tag: go1.22rc1~1301 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=aa5d483f25e89f3bf399362ccc9a5b146cae5c79;p=gostls13.git runtime: mark traceEnabled and traceShuttingDown as no:split This fixes a regression from CL 494181. The traceEnabled function splits the stack and is being called by reentersyscall that shouldn't call anything that splits the stack. Same with traceShuttingDown. Fixes #61975 Change-Id: I5eca0ba74cfa6acb0259e8400b03c2093cd59dd1 GitHub-Last-Rev: 9e55ae9d7cc700de9757d32a7905127a349d973a GitHub-Pull-Request: golang/go#61981 Reviewed-on: https://go-review.googlesource.com/c/go/+/519055 Reviewed-by: Michael Knyszek Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Run-TryBot: Dmitri Shuralyov --- diff --git a/src/runtime/trace.go b/src/runtime/trace.go index a4d50d77a0..7d7987c90c 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -257,11 +257,15 @@ func traceBufPtrOf(b *traceBuf) traceBufPtr { } // traceEnabled returns true if the trace is currently enabled. +// +//go:nosplit func traceEnabled() bool { return trace.enabled } // traceShuttingDown returns true if the trace is currently shutting down. +// +//go:nosplit func traceShuttingDown() bool { return trace.shutdown }