diff options
author | Tom Tromey <tromey@adacore.com> | 2019-04-24 12:13:35 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-04-25 12:59:35 -0600 |
commit | 3d1cbb78936fbf2985ffd2ebf074841599ead788 (patch) | |
tree | 728d88d63e015063cbe01606711f2b0b3153dbd2 /gdb/c-lang.c | |
parent | 94aeb44b001ab2d632806242a3bacb0a879abe15 (diff) | |
download | binutils-3d1cbb78936fbf2985ffd2ebf074841599ead788.zip binutils-3d1cbb78936fbf2985ffd2ebf074841599ead788.tar.gz binutils-3d1cbb78936fbf2985ffd2ebf074841599ead788.tar.bz2 |
Fix memory leak in exception code
PR gdb/24475 concerns a memory leak coming from gdb's exception
handling code.
The leak occurs because throw_exception_sjlj does not arrange to
destroy the exception object it is passed. However, because
gdb_exception has a destructor, it's undefined to longjmp in this
situation.
This patch fixes the problem by avoiding the need to run any
destructors in gdb_rl_callback_handler, by making the gdb_exception
"static".
gdb/ChangeLog
2019-04-25 Tom Tromey <tromey@adacore.com>
PR gdb/24475:
* event-top.c (gdb_rl_callback_handler): Make "gdb_rl_expt"
static.
Diffstat (limited to 'gdb/c-lang.c')
0 files changed, 0 insertions, 0 deletions