mirror of
https://github.com/golang/go
synced 2024-09-29 09:34:28 -06:00
runtime: improve asanread/asanwrite nosplit comment
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>
This commit is contained in:
parent
c7fa66179b
commit
1cc3c73580
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user