Bug 26003 - infinite loop loading symbols from separate debug objfile
Summary: infinite loop loading symbols from separate debug objfile
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: 9.1
: P2 normal
Target Milestone: 9.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-17 15:52 UTC by Joel Brobecker
Modified: 2020-05-17 16:41 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Brobecker 2020-05-17 15:52:48 UTC
This is to record an issue which was fixed in master on Apr 10th, 2020:
https://sourceware.org/pipermail/gdb-patches/2020-April/167305.html

<<
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.
>>
Comment 1 Sourceware Commits 2020-05-17 15:59:19 UTC
The gdb-9-branch branch has been updated by Joel Brobecker <brobecke@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9502fa5ea9e01670852466249025bc126de9945c

commit 9502fa5ea9e01670852466249025bc126de9945c
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Sun May 17 08:57:06 2020 -0700

    gdb/ChangeLog: Add PR number to the latest entry
    
    This adds the PR number to the following gdb/ChangeLog  entry:
    
    2020-05-17  Tom Tromey  <tromey@adacore.com>
    
        Pushed by Joel Brobecker  <brobecker@adacore.com>
        PR symtab/26003
        * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
Comment 2 Joel Brobecker 2020-05-17 16:40:57 UTC
patch backported