Explain the conditions under which they are called on stacks that
cannot grow.
Change-Id: I08ee5480face7fbedeccc09e55b8149c5a793c2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/376036
Trust: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Fannie Zhang <Fannie.Zhang@arm.com>
// 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.
+// asan{read,write} are nosplit because they may be called between
+// fork and exec, when the stack must not grow. See issue #50391.
+
//go:nosplit
func asanread(addr unsafe.Pointer, sz uintptr) {
sp := getcallersp()