aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/lib/gdb.exp14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 5d6f126..ef68c3c 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -25,13 +25,6 @@ if {$tool == ""} {
exit 2
}
-# If GDB is built with ASAN (and because there are leaks), it will output a
-# leak report when exiting as well as exit with a non-zero (failure) status.
-# This can affect tests that are sensitive to what GDB prints on stderr or its
-# exit status. Add `detect_leaks=0` to the ASAN_OPTIONS environment variable
-# (which will affect any spawned sub-process) to avoid this.
-append ::env(ASAN_OPTIONS) ",detect_leaks=0"
-
# Add VAR_ID=VAL to ENV_VAR, unless ENV_VAR already contains a VAR_ID setting.
proc set_sanitizer_default { env_var var_id val } {
@@ -58,6 +51,13 @@ proc set_sanitizer_default { env_var var_id val } {
set_sanitizer_default TSAN_OPTIONS suppressions \
$srcdir/../tsan-suppressions.txt
+# If GDB is built with ASAN (and because there are leaks), it will output a
+# leak report when exiting as well as exit with a non-zero (failure) status.
+# This can affect tests that are sensitive to what GDB prints on stderr or its
+# exit status. Add `detect_leaks=0` to the ASAN_OPTIONS environment variable
+# (which will affect any spawned sub-process) to avoid this.
+set_sanitizer_default ASAN_OPTIONS detect_leaks 0
+
# List of procs to run in gdb_finish.
set gdb_finish_hooks [list]