aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/asan.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/asan.go b/src/runtime/asan.go
index affafd4d8d..26656cd975 100644
--- a/src/runtime/asan.go
+++ b/src/runtime/asan.go
@@ -26,12 +26,16 @@ func ASanWrite(addr unsafe.Pointer, len int) {
// Private interface for the runtime.
const asanenabled = true
+// Mark asan(read, write) as NOSPLIT, because they may run
+// on stacks that cannot grow. See issue #50391.
+//go:nosplit
func asanread(addr unsafe.Pointer, sz uintptr) {
sp := getcallersp()
pc := getcallerpc()
doasanread(addr, sz, sp, pc)
}
+//go:nosplit
func asanwrite(addr unsafe.Pointer, sz uintptr) {
sp := getcallersp()
pc := getcallerpc()