]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Set PYTHONMALLOC in the test suite
authorTom Tromey <tromey@adacore.com>
Fri, 28 Jul 2023 12:25:11 +0000 (06:25 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 31 Jul 2023 14:22:45 +0000 (08:22 -0600)
Setting PYTHONMALLOC helped me locate an earlier bug.  It seems to me
that there aren't big downsides to always setting this during testing,
and it might help find other bugs in the future.

gdb/testsuite/lib/gdb.exp

index 66c04a2efe233eb881779d6076bc4b7b54d819a1..12a9c59decec6cdf5bd76c653928f4815bc192c0 100644 (file)
@@ -6437,6 +6437,10 @@ proc default_gdb_init { test_file_name } {
     # tests.
     setenv TERM "dumb"
 
+    # This setting helps detect bugs in the Python code and doesn't
+    # seem to have a significant downside for the tests.
+    setenv PYTHONMALLOC malloc_debug
+
     # If DEBUGINFOD_URLS is set, gdb will try to download sources and
     # debug info for f.i. system libraries.  Prevent this.
     if { [is_remote host] } {