diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-10 07:18:49 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-10 07:21:16 -0600 |
commit | 0c4311ab90e46d2ae0cc29160641b92220d10299 (patch) | |
tree | 1fc9e6c2394e8f3843807f07e1c5e41d256ac7c9 /gdb/ChangeLog | |
parent | 3e65b3e9aff265b8db711f742ea527b4c2e36910 (diff) | |
download | gdb-0c4311ab90e46d2ae0cc29160641b92220d10299.zip gdb-0c4311ab90e46d2ae0cc29160641b92220d10299.tar.gz gdb-0c4311ab90e46d2ae0cc29160641b92220d10299.tar.bz2 |
Avoid infinite recursion in get_msymbol_address
Sometimes, get_msymbol_address can cause infinite recursion, leading
to a crash. This was reported previously here:
https://sourceware.org/pipermail/gdb-patches/2019-November/162154.html
A user on irc reported this as well, and with his help and the help of
a friend of his, we found that the problem occurred because, when
reloading a separate debug objfile, the objfile would lose the
OBJF_MAINLINE flag. This would cause some symbols from this separate
debug objfile to be marked "maybe_copied" -- but then
get_msymbol_address could find the same symbol and fail as reported.
This patch fixes the bug by preserving OBJF_MAINLINE.
No test case, unfortunately, because I could not successfully make
one.
gdb/ChangeLog
2020-04-10 Tom Tromey <tromey@adacore.com>
* symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fa05f93..661a414 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2020-04-10 Tom Tromey <tromey@adacore.com> + * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE. + +2020-04-10 Tom Tromey <tromey@adacore.com> + * symtab.c (get_symbol_address, get_msymbol_address): Skip separate debug files. |