]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: improve asanread/asanwrite nosplit comment
authorAustin Clements <austin@google.com>
Thu, 6 Jan 2022 20:25:01 +0000 (15:25 -0500)
committerAustin Clements <austin@google.com>
Tue, 11 Jan 2022 16:08:43 +0000 (16:08 +0000)
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>
src/runtime/asan.go

index 26656cd975c2a6b0a645f439fa5b3f7ad297ad72..5f1e6370d2f293e4f8dd8040fa0c8b69d682a0e7 100644 (file)
@@ -26,8 +26,9 @@ 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.
+// 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()