aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execer.cpp
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-12-06 12:07:12 -0700
committerTom Tromey <tromey@adacore.com>2023-04-13 13:58:35 -0600
commitf96328accde1e6302b62aa880675594618079cb3 (patch)
tree4ed79fe1a3f483cdf92db1dd2d530658cb68f68e /gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execer.cpp
parent546c7898dccb204eb56c8ed7c5b707c75de31b53 (diff)
downloadbinutils-f96328accde1e6302b62aa880675594618079cb3.zip
binutils-f96328accde1e6302b62aa880675594618079cb3.tar.gz
binutils-f96328accde1e6302b62aa880675594618079cb3.tar.bz2
Avoid double-free with debuginfod
PR gdb/29257 points out a possible double free when debuginfod is in use. Aside from some ugly warts in the symbol code (an ongoing issue), the underlying issue in this particular case is that elfread.c seems to assume that symfile_bfd_open will return NULL on error, whereas in reality it throws an exception. As this code isn't prepared for an exception, bad things result. This patch fixes the problem by introducing a non-throwing variant of symfile_bfd_open and using it in the affected places. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29257
Diffstat (limited to 'gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execer.cpp')
0 files changed, 0 insertions, 0 deletions