1
0
mirror of https://github.com/golang/go synced 2024-11-14 09:10:27 -07:00
go/misc/cgo/testsanitizers/testdata
fanzha02 c379c3d58d cmd/compile: set conversions to unsafe.Pointer as an escaping operation when -asan is enabled
When ASan is enabled, treat conversions to unsafe.Pointer as
an escaping operation. In this way, all pointer operations on
the stack objects will become operations on the escaped heap
objects. As we've already supported ASan detection of error
memory accesses to heap objects. With this trick, we can use
-asan option to report errors on bad stack operations.

Add test cases.

Updates #44853.

Change-Id: I6281e77f6ba581d7008d610f0b24316078b6e746
Reviewed-on: https://go-review.googlesource.com/c/go/+/393315
Trust: Fannie Zhang <Fannie.Zhang@arm.com>
Run-TryBot: Fannie Zhang <Fannie.Zhang@arm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eric Fang <eric.fang@arm.com>
2022-03-17 08:43:51 +00:00
..
asan1_fail.go runtime: fix the issue that the -asan option cannot print where the error occurred 2021-12-29 04:10:07 +00:00
asan2_fail.go runtime: fix the issue that the -asan option cannot print where the error occurred 2021-12-29 04:10:07 +00:00
asan3_fail.go cmd/dist: add asan tests in misc/cgo/testsanitizers package 2021-11-02 06:21:44 +00:00
asan4_fail.go cmd/dist: add asan tests in misc/cgo/testsanitizers package 2021-11-02 06:21:44 +00:00
asan5_fail.go src/runtime: mark asanread and asanwrite functions as NOSPLIT 2022-01-05 09:50:29 +00:00
asan_unsafe_fail1.go cmd/compile: set conversions to unsafe.Pointer as an escaping operation when -asan is enabled 2022-03-17 08:43:51 +00:00
asan_unsafe_fail2.go cmd/compile: set conversions to unsafe.Pointer as an escaping operation when -asan is enabled 2022-03-17 08:43:51 +00:00
asan_unsafe_fail3.go cmd/compile: set conversions to unsafe.Pointer as an escaping operation when -asan is enabled 2022-03-17 08:43:51 +00:00
asan_useAfterReturn.go cmd/dist: add asan tests in misc/cgo/testsanitizers package 2021-11-02 06:21:44 +00:00
msan2_cmsan.go
msan2.go
msan3.go
msan4.go
msan5.go
msan6.go
msan7.go
msan8.go runtime/cgo: when using msan explicitly unpoison cgoCallers 2021-08-09 14:48:39 +00:00
msan_fail.go
msan_shared.go
msan.go
tsan2.go
tsan3.go
tsan4.go
tsan5.go
tsan6.go
tsan7.go
tsan8.go
tsan9.go all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
tsan10.go
tsan11.go
tsan12.go
tsan_shared.go
tsan.go