aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dap
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-10-07 10:44:45 +0200
committerTom de Vries <tdevries@suse.de>2024-10-07 10:44:45 +0200
commit11fe8653a97a2d113eb58680021c657a68d5d362 (patch)
treea4749580c8a3d2d6d7fbe4ffaddecee4a2a7cf00 /gdb/testsuite/gdb.dap
parentd396fcc9d17af551e8bc8543a7676694527893e4 (diff)
downloadgdb-11fe8653a97a2d113eb58680021c657a68d5d362.zip
gdb-11fe8653a97a2d113eb58680021c657a68d5d362.tar.gz
gdb-11fe8653a97a2d113eb58680021c657a68d5d362.tar.bz2
[gdb/testsuite] Fix gdb.python/py-inferior.exp with -fsanitize=thread
With a gdb build with -fsanitize=thread, and test-case gdb.python/py-inferior.exp I run into: ... (gdb) python gdb.selected_inferior().read_memory (0, 0xffffffffffffffff)^M ERROR: ThreadSanitizer: requested allocation size 0xffffffffffffffff exceeds \ maximum supported size of 0x10000000000^M ... There's already a workaround for this using ASAN_OPTIONS, and apparently the same is needed for TSAN_OPTIONS. Add the allocator_may_return_null=1 workaround also in TSAN_OPTIONS. Likewise in gdb.dap/memory.exp. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.dap')
-rw-r--r--gdb/testsuite/gdb.dap/memory.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dap/memory.exp b/gdb/testsuite/gdb.dap/memory.exp
index 7082706..c4e4fb3 100644
--- a/gdb/testsuite/gdb.dap/memory.exp
+++ b/gdb/testsuite/gdb.dap/memory.exp
@@ -25,11 +25,12 @@ if {[build_executable ${testfile}.exp $testfile] == -1} {
return
}
-save_vars { env(ASAN_OPTIONS) } {
+save_vars { env(ASAN_OPTIONS) env(TSAN_OPTIONS) } {
# The request readMemory with count 18446744073709551615 triggers address
# sanitizer. Suppress the error, leaving us with just this warning:
# WARNING: AddressSanitizer failed to allocate 0xffffffffffffffff bytes
set_sanitizer ASAN_OPTIONS allocator_may_return_null 1
+ set_sanitizer TSAN_OPTIONS allocator_may_return_null 1
if {[dap_initialize] == ""} {
return