1
0
mirror of https://github.com/golang/go synced 2024-11-26 21:01:31 -07:00

runtime: mark traceEnabled as no:split

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
This commit is contained in:
Mauri de Souza Meneguzzo 2023-08-12 11:52:10 -03:00
parent 610d47a584
commit 9e55ae9d7c

View File

@ -257,11 +257,15 @@ func traceBufPtrOf(b *traceBuf) traceBufPtr {
} }
// traceEnabled returns true if the trace is currently enabled. // traceEnabled returns true if the trace is currently enabled.
//
//go:nosplit
func traceEnabled() bool { func traceEnabled() bool {
return trace.enabled return trace.enabled
} }
// traceShuttingDown returns true if the trace is currently shutting down. // traceShuttingDown returns true if the trace is currently shutting down.
//
//go:nosplit
func traceShuttingDown() bool { func traceShuttingDown() bool {
return trace.shutdown return trace.shutdown
} }