1
0
mirror of https://github.com/golang/go synced 2024-09-30 00:14:36 -06:00
go/misc/cgo
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
..
errors misc/cgo: fix aliasing bugs in parallel tests that append to shared slices 2022-02-07 17:51:57 +00:00
fortran
gmp all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
life
nocgo
stdio
test misc/cgo/test: disable unhelpful GCC warning 2022-02-03 22:55:24 +00:00
testasan
testcarchive misc/cgo: fix aliasing bugs in parallel tests that append to shared slices 2022-02-07 17:51:57 +00:00
testcshared misc/cgo: fix aliasing bugs in parallel tests that append to shared slices 2022-02-07 17:51:57 +00:00
testgodefs cmd/cgo: for godefs, don't let field prefix removal cause duplicates 2021-09-16 23:56:28 +00:00
testplugin cmd/link: mark unexported methods for plugins 2022-03-16 20:10:07 +00:00
testsanitizers cmd/compile: set conversions to unsafe.Pointer as an escaping operation when -asan is enabled 2022-03-17 08:43:51 +00:00
testshared misc/cgo/testshared: increase size limit in size check 2021-12-15 20:19:05 +00:00
testsigfwd
testso all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testsovar all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testtls all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00