From f717822dd7b07c8b1cb92a19bc4778bd9c967116 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 28 Jul 2023 06:25:11 -0600 Subject: [PATCH] Set PYTHONMALLOC in the test suite 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 66c04a2efe2..12a9c59dece 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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] } { -- 2.30.2