]> Cypherpunks repositories - gostls13.git/commit
src/runtime: mark asanread and asanwrite functions as NOSPLIT
authorfanzha02 <fannie.zhang@arm.com>
Thu, 30 Dec 2021 03:09:42 +0000 (11:09 +0800)
committerFannie Zhang <Fannie.Zhang@arm.com>
Wed, 5 Jan 2022 09:50:29 +0000 (09:50 +0000)
commit2c58bb2e428c1f587dc30817bc211570f6fd4793
treef1621f6baa6301e7893c74b4bf40d8287e0e4278
parent301db3f5d2d38a13aafe5bc6efea9a3bdbfc475e
src/runtime: mark asanread and asanwrite functions as NOSPLIT

The asan runtime functions may run on stacks that cannot grow, and
they do not have large local variables, so it is safe to mark them
as NOSPLIT.

Add test case.

Fixes #50391

Change-Id: Iadcbf1ae0c837d9b64da5be208c7f424e6ba11de
Reviewed-on: https://go-review.googlesource.com/c/go/+/374398
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Fannie Zhang <Fannie.Zhang@arm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
misc/cgo/testsanitizers/asan_test.go
misc/cgo/testsanitizers/testdata/asan5_fail.go [new file with mode: 0644]
src/runtime/asan.go