public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert
@ 2012-12-26 20:13 forum at emblocks dot org
2012-12-26 20:14 ` [Bug corefiles/14983] " forum at emblocks dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: forum at emblocks dot org @ 2012-12-26 20:13 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
@ 2012-12-26 20:14 ` forum at emblocks dot org
2013-03-06 22:02 ` tromey at redhat dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: forum at emblocks dot org @ 2012-12-26 20:14 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
Gerard Zagema <forum at emblocks dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |forum at emblocks dot org
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
2012-12-26 20:14 ` [Bug corefiles/14983] " forum at emblocks dot org
@ 2013-03-06 22:02 ` tromey at redhat dot com
2013-03-07 6:44 ` forum at emblocks dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-03-06 22:02 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2013-03-06 22:02:49 UTC ---
It would be useful to know how to trigger the bug.
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
2012-12-26 20:14 ` [Bug corefiles/14983] " forum at emblocks dot org
2013-03-06 22:02 ` tromey at redhat dot com
@ 2013-03-07 6:44 ` forum at emblocks dot org
2013-03-07 6:46 ` forum at emblocks dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: forum at emblocks dot org @ 2013-03-07 6:44 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
--- Comment #2 from Gerard Zagema <forum at emblocks dot org> 2013-03-07 06:44:24 UTC ---
The bug can be triggered if you take an ARM build and load a file created with
the RealView compiler from ELF.
I could send you such file but you also need another patch to solve another bug
in the same file which takes care of the path separators, a bug which is for
ages in GDB.
The previous versions always go right because the NULL_POINTER was tested and
now it is used without test which will give a crash instantly if I try to set a
breakpoint.
The 7.5.1 version is, with the modifications I did, working fine.
Regards
Gerard
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (2 preceding siblings ...)
2013-03-07 6:44 ` forum at emblocks dot org
@ 2013-03-07 6:46 ` forum at emblocks dot org
2013-03-08 16:03 ` tromey at redhat dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: forum at emblocks dot org @ 2013-03-07 6:46 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
--- Comment #3 from Gerard Zagema <forum at emblocks dot org> 2013-03-07 06:46:18 UTC ---
The bug can be triggered if you take an ARM build and load a file created with
the RealView compiler from ARM.
I could send you such file but you also need another patch to solve another bug
in the same file which takes care of the path separators, a bug which is for
ages in GDB.
The previous versions always go right because the NULL_POINTER was tested and
now it is used without test which will give a crash instantly if I try to set a
breakpoint.
The 7.5.1 version is, with the modifications I did, working fine.
Regards
Gerard
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (3 preceding siblings ...)
2013-03-07 6:46 ` forum at emblocks dot org
@ 2013-03-08 16:03 ` tromey at redhat dot com
2013-04-12 17:44 ` tromey at redhat dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-03-08 16:03 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
--- Comment #4 from Tom Tromey <tromey at redhat dot com> 2013-03-08 16:03:29 UTC ---
(In reply to comment #3)
> The bug can be triggered if you take an ARM build and load a file created with
> the RealView compiler from ARM.
>
> I could send you such file but you also need another patch to solve another bug
> in the same file which takes care of the path separators, a bug which is for
> ages in GDB.
If you could attach a small one, that would be helpful.
I am mostly concerned about how to write a regression test for this.
So I'd want to inspect the DWARF to see what is confusing gdb.
Could you please file the path separator thing, plus your patch,
as a separate bug?
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (4 preceding siblings ...)
2013-03-08 16:03 ` tromey at redhat dot com
@ 2013-04-12 17:44 ` tromey at redhat dot com
2013-04-12 17:45 ` tromey at redhat dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-04-12 17:44 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smarf at gmx dot de
--- Comment #5 from Tom Tromey <tromey at redhat dot com> 2013-04-12 17:44:23 UTC ---
*** Bug 15325 has been marked as a duplicate of this bug. ***
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (5 preceding siblings ...)
2013-04-12 17:44 ` tromey at redhat dot com
@ 2013-04-12 17:45 ` tromey at redhat dot com
2013-04-12 17:46 ` tromey at redhat dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-04-12 17:45 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Andreas.Kaufmann at gmx dot
| |de
--- Comment #6 from Tom Tromey <tromey at redhat dot com> 2013-04-12 17:45:35 UTC ---
*** Bug 15343 has been marked as a duplicate of this bug. ***
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (6 preceding siblings ...)
2013-04-12 17:45 ` tromey at redhat dot com
@ 2013-04-12 17:46 ` tromey at redhat dot com
2013-04-25 16:25 ` cvs-commit at gcc dot gnu.org
2013-04-25 16:27 ` tromey at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-04-12 17:46 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
--- Comment #7 from Tom Tromey <tromey at redhat dot com> 2013-04-12 17:46:02 UTC ---
There is a patch pending:
http://sourceware.org/ml/gdb-patches/2013-04/msg00171.html
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (7 preceding siblings ...)
2013-04-12 17:46 ` tromey at redhat dot com
@ 2013-04-25 16:25 ` cvs-commit at gcc dot gnu.org
2013-04-25 16:27 ` tromey at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-04-25 16:25 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2013-04-25 16:25:38 UTC ---
CVSROOT: /cvs/src
Module name: src
Changes by: tromey@sourceware.org 2013-04-25 16:25:37
Modified files:
gdb : ChangeLog dwarf2read.c
gdb/testsuite : ChangeLog
Added files:
gdb/testsuite/gdb.dwarf2: nostaticblock.exp
Log message:
PR corefiles/14983:
* dwarf2read.c (process_full_comp_unit): Always create a static
block.
gdb/testsuite
* gdb.dwarf2/nostaticblock.exp: New file.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15474&r2=1.15475
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.788&r2=1.789
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3638&r2=1.3639
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/nostaticblock.exp.diff?cvsroot=src&r1=NONE&r2=1.1
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug corefiles/14983] GDB 7.5.1 crash due to NULL pointer reference at -break-insert
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
` (8 preceding siblings ...)
2013-04-25 16:25 ` cvs-commit at gcc dot gnu.org
@ 2013-04-25 16:27 ` tromey at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-04-25 16:27 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14983
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |7.7
--- Comment #9 from Tom Tromey <tromey at redhat dot com> 2013-04-25 16:27:26 UTC ---
Fix checked in.
--
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-04-25 16:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-26 20:13 [Bug corefiles/14983] New: GDB 7.5.1 crash due to NULL pointer reference at -break-insert forum at emblocks dot org
2012-12-26 20:14 ` [Bug corefiles/14983] " forum at emblocks dot org
2013-03-06 22:02 ` tromey at redhat dot com
2013-03-07 6:44 ` forum at emblocks dot org
2013-03-07 6:46 ` forum at emblocks dot org
2013-03-08 16:03 ` tromey at redhat dot com
2013-04-12 17:44 ` tromey at redhat dot com
2013-04-12 17:45 ` tromey at redhat dot com
2013-04-12 17:46 ` tromey at redhat dot com
2013-04-25 16:25 ` cvs-commit at gcc dot gnu.org
2013-04-25 16:27 ` tromey at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).