]> Cypherpunks repositories - gostls13.git/commit
runtime: in asan mode call __lsan_do_leak_check when exiting
authorIan Lance Taylor <iant@golang.org>
Sat, 22 Feb 2025 01:13:20 +0000 (17:13 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 6 Mar 2025 02:23:46 +0000 (18:23 -0800)
commit645ea530191105dc89dd8d67640d61a4d0526df9
tree9773a3cbe6cef7053f74cc4ef24c1d9ffb8d99af
parentcad4dca518a3a984bfd6b19ee304a59f51937fd8
runtime: in asan mode call __lsan_do_leak_check when exiting

This enables the ASAN default behavior of reporting C memory leaks.
It can be disabled with ASAN_OPTIONS=detect_leaks=0.

Fixes #67833

Change-Id: I420da1b5d79cf70d8cf134eaf97bf0a22f61ffd0
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-asan-clang15,gotip-linux-arm64-asan-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/651755
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
20 files changed:
doc/next/3-tools.md
src/cmd/cgo/internal/test/issue4029.go
src/cmd/cgo/internal/test/test.go
src/cmd/cgo/internal/testsanitizers/cc_test.go
src/cmd/cgo/internal/testsanitizers/lsan_test.go [new file with mode: 0644]
src/cmd/cgo/internal/testsanitizers/testdata/lsan1.go [new file with mode: 0644]
src/cmd/cgo/internal/testsanitizers/testdata/lsan2.go [new file with mode: 0644]
src/cmd/cgo/internal/testsanitizers/testdata/lsan3.go [new file with mode: 0644]
src/runtime/asan.go
src/runtime/asan/asan.go
src/runtime/asan0.go
src/runtime/asan_amd64.s
src/runtime/asan_arm64.s
src/runtime/asan_loong64.s
src/runtime/asan_ppc64le.s
src/runtime/asan_riscv64.s
src/runtime/mem.go
src/runtime/proc.go
src/runtime/vdso_test.go
src/syscall/exec_linux_test.go