]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.python/py-inferior.exp
[gdb/testsuite] Use allocator_may_return_null=1 in two test-cases
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.python / py-inferior.exp
index 4c19e259159ee694154a00428a157cf8080fb270..e74fbfd050d00af53838c88bb0b54e16def7071c 100644 (file)
@@ -27,7 +27,15 @@ if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable
 }
 
 # Start with a fresh gdb.
-clean_restart ${testfile}
+save_vars { env(ASAN_OPTIONS) } {
+    # The call to gdb.selected_inferior().read_memory (0, 0xffffffffffffffff)
+    # 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
+
+    clean_restart ${testfile}
+}
 
 switch [get_endianness] {
     little { set python_pack_char "<" }