aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_linux_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2025-02-21 17:13:20 -0800
committerGopher Robot <gobot@golang.org>2025-03-05 18:23:46 -0800
commit645ea530191105dc89dd8d67640d61a4d0526df9 (patch)
tree9773a3cbe6cef7053f74cc4ef24c1d9ffb8d99af /src/syscall/exec_linux_test.go
parentcad4dca518a3a984bfd6b19ee304a59f51937fd8 (diff)
downloadgo-645ea530191105dc89dd8d67640d61a4d0526df9.tar.xz
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>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
-rw-r--r--src/syscall/exec_linux_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go
index 04973dc9ad..69d4916944 100644
--- a/src/syscall/exec_linux_test.go
+++ b/src/syscall/exec_linux_test.go
@@ -11,6 +11,7 @@ import (
"errors"
"flag"
"fmt"
+ "internal/asan"
"internal/platform"
"internal/syscall/unix"
"internal/testenv"
@@ -334,6 +335,10 @@ func TestUnshareMountNameSpaceChroot(t *testing.T) {
// Test for Issue 29789: unshare fails when uid/gid mapping is specified
func TestUnshareUidGidMapping(t *testing.T) {
+ if asan.Enabled {
+ t.Skip("test fails with ASAN beause the ASAN leak checker fails finding memory regions")
+ }
+
if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
defer os.Exit(0)
if err := syscall.Chroot(os.TempDir()); err != nil {