Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionKonstantin Volkov
2011-10-31 18:56:39 UTC
Created attachment 531015[details]
Patch that fix the crash
Description of problem:
gdb crashes on some dwarf2 executables with NULL symtab
Version-Release number of selected component (if applicable):
gdb-7.2-48.el6
How reproducible:
100%
Steps to Reproduce:
1. Build the dwarf2 with null symtab
2. Run gdb
3. Crash
Actual results:
Crash
Expected results:
Don't crash
Additional info:
With this small patch all is OK. Please, apply:
---
--- gdb-7.3/gdb/dwarf2read.c.orig 2011-10-27 16:11:01.000000000 +0400
+++ gdb-7.3/gdb/dwarf2read.c 2011-10-27 16:11:09.000000000 +0400
@@ -11444,7 +11444,8 @@ new_symbol_full (struct die_info *die, s
/* For the benefit of old versions of GCC, check for anonymous
namespaces based on the demangled name. */
if (!processing_has_namespace_info
- && cu->language == language_cplus)
+ && cu->language == language_cplus
+ && sym->symtab)
cp_scan_for_anonymous_namespaces (sym);
}
return (sym);
---
It has been fixed upstream by:
ad387dddfa899b9ef76e3c2420b163e0ca47fe16 is the first bad (=good) commit
commit ad387dddfa899b9ef76e3c2420b163e0ca47fe16
Author: Aleksandar Ristovski <aristovski>
Date: Thu Oct 20 20:06:11 2011 +0000
* cp-namespace.c (cp_scan_for_anonymous_namespaces): Changed function
arguments by adding OBJFILE. Instead of getting objfile from
symbol's symtab, use new argument OBJFILE.
* cp-support.h (cp_scan_for_anonymous_namespaces): Changed function
arguments by adding OBJFILE.
* gdb/dwarf2read.c (new_symbol_full): Change call to
cp_scan_for_anonymous_namespaces to match new signature.
* gdb/stabsread.c (define_symbol): Change call to
cp_scan_for_anonymous_namespaces to match new signature.
To ensure it gets backported you should contact your RHEL support services.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2012-0930.html
Created attachment 531015 [details] Patch that fix the crash Description of problem: gdb crashes on some dwarf2 executables with NULL symtab Version-Release number of selected component (if applicable): gdb-7.2-48.el6 How reproducible: 100% Steps to Reproduce: 1. Build the dwarf2 with null symtab 2. Run gdb 3. Crash Actual results: Crash Expected results: Don't crash Additional info: With this small patch all is OK. Please, apply: --- --- gdb-7.3/gdb/dwarf2read.c.orig 2011-10-27 16:11:01.000000000 +0400 +++ gdb-7.3/gdb/dwarf2read.c 2011-10-27 16:11:09.000000000 +0400 @@ -11444,7 +11444,8 @@ new_symbol_full (struct die_info *die, s /* For the benefit of old versions of GCC, check for anonymous namespaces based on the demangled name. */ if (!processing_has_namespace_info - && cu->language == language_cplus) + && cu->language == language_cplus + && sym->symtab) cp_scan_for_anonymous_namespaces (sym); } return (sym); ---