]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.dap/memory.exp
[gdb/testsuite] Use allocator_may_return_null=1 in two test-cases
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dap / memory.exp
index 4e2e361289aeca36f2c1696f7ec294a47d0688be..7082706e11cb6505d59bbdb3e1bf31996fe0b897 100644 (file)
@@ -25,8 +25,15 @@ if {[build_executable ${testfile}.exp $testfile] == -1} {
     return
 }
 
-if {[dap_initialize] == ""} {
-    return
+save_vars { env(ASAN_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
+
+    if {[dap_initialize] == ""} {
+       return
+    }
 }
 
 set line [gdb_get_line_number "BREAK"]