]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add -asan option
authorFannie Zhang <fannie.zhang@arm.com>
Wed, 6 Jan 2021 08:57:44 +0000 (08:57 +0000)
committerfannie zhang <Fannie.Zhang@arm.com>
Tue, 26 Oct 2021 01:18:46 +0000 (01:18 +0000)
commit49fda9e4f5cd3a05fd5fa0b3a2047a9d24873bd6
tree37f1363f345aac34e290e746bf130bb54588eb5e
parent41f74079a982dae05da1860a5f195ac08d067bdd
cmd/go: add -asan option

The -asan option compiles Go code to use the address sanitizer.  This is
intended for use when linking with C/C++ code compiled with -fsanitize=address.
When memory blocks are passed back and forth between C/C++ and Go, code in
both languages will agree as to whether the memory is validly allocated or not,
and will report errors for any use of invalid memory.

Updates #44853.

Change-Id: I0209002ef795cc1c823daae557fb80c906158db3
Reviewed-on: https://go-review.googlesource.com/c/go/+/298612
Trust: fannie zhang <Fannie.Zhang@arm.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/go_test.go
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/internal/work/build.go
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/init.go
src/cmd/go/script_test.go
src/cmd/go/testdata/script/README
src/cmd/go/testdata/script/goflags.txt
src/cmd/go/testdata/script/install_msan_and_race_require_cgo.txt