This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointerreference at -break-insert
- From: "forum at emblocks dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 26 Dec 2012 20:13:50 +0000
- Subject: [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointerreference at -break-insert
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
Bug #: 14983
Summary: GDB 7.5.1 crash due to NULL pointer reference at
-break-insert
Product: gdb
Version: 7.5
Status: NEW
Severity: critical
Priority: P2
Component: corefiles
AssignedTo: unassigned@sourceware.org
ReportedBy: forum@emblocks.org
Classification: Unclassified
File: dwarf2read.c
Function: process_full_comp_unit
Original:
static_block = end_symtab_get_static_block (highpc + baseaddr, objfile, 0);
/* If the comp unit has DW_AT_ranges, it may have discontiguous ranges.
Also, DW_AT_ranges may record ranges not belonging to any child DIEs
(such as virtual method tables). Record the ranges in STATIC_BLOCK's
addrmap to help ensure it has an accurate map of pc values belonging to
this comp unit. */
dwarf2_record_block_ranges (cu->dies, static_block, baseaddr, cu);
symtab = end_symtab_from_static_block (static_block, objfile,
SECT_OFF_TEXT (objfile), 0);
The pointer static_block can be NULL while iterating through the symbols. this
will cause a crash of GDB.
I have this patched by:
static_block = end_symtab_get_static_block (highpc + baseaddr, objfile, 0);
/* If the comp unit has DW_AT_ranges, it may have discontiguous ranges.
Also, DW_AT_ranges may record ranges not belonging to any child DIEs
(such as virtual method tables). Record the ranges in STATIC_BLOCK's
addrmap to help ensure it has an accurate map of pc values belonging to
this comp unit. */
// NOTE (Gerard#1#): Bug fix!!!!!!
symtab = NULL;
if(static_block )
{
dwarf2_record_block_ranges (cu->dies, static_block, baseaddr, cu);
symtab = end_symtab_from_static_block (static_block, objfile,
SECT_OFF_TEXT (objfile), 0);
}
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.