aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-block.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2025-10-13 21:36:56 -0600
committerTom Tromey <tom@tromey.com>2025-10-13 21:40:19 -0600
commit4109b068142bc8e7c19728c163c5685fdaeea851 (patch)
treed114d10337209563afa3916b8d0fe88aec8e143d /gdb/python/py-block.c
parent2358bcf0459f7f6d49622e8ad0bfbb9a2bb10b5f (diff)
downloadbinutils-4109b068142bc8e7c19728c163c5685fdaeea851.zip
binutils-4109b068142bc8e7c19728c163c5685fdaeea851.tar.gz
binutils-4109b068142bc8e7c19728c163c5685fdaeea851.tar.bz2
Fix use-after-free when destroying objfile
The recent patch to heap-allocate compunit_symtabs introduced a use-after-free that can occur when destroying an objfile. The bug here is that the objfile obstack is destroyed before compunit_symtabs; but the compunit_symtabs destructor refers to the symtabs, which are allocated on the obstack. This patch fixes the problem. This was reported using ASAN, but I reproduced it with valgrind and verified that this fixes the problem. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33435
Diffstat (limited to 'gdb/python/py-block.c')
0 files changed, 0 insertions, 0 deletions