Skip to content

Commit 9e55ae9

Browse files
committed
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
1 parent 610d47a commit 9e55ae9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/trace.go

+4
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,15 @@ func traceBufPtrOf(b *traceBuf) traceBufPtr {
257257
}
258258

259259
// traceEnabled returns true if the trace is currently enabled.
260+
//
261+
//go:nosplit
260262
func traceEnabled() bool {
261263
return trace.enabled
262264
}
263265

264266
// traceShuttingDown returns true if the trace is currently shutting down.
267+
//
268+
//go:nosplit
265269
func traceShuttingDown() bool {
266270
return trace.shutdown
267271
}

0 commit comments

Comments
 (0)