public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug symtab/11465] New: Crash on NULL TYPE_FIELD_TYPE @ 2010-04-01 19:56 jan dot kratochvil at redhat dot com 2010-04-01 19:57 ` [Bug symtab/11465] " jan dot kratochvil at redhat dot com ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: jan dot kratochvil at redhat dot com @ 2010-04-01 19:56 UTC (permalink / raw) To: gdb-prs This bugreport assumes this patch is reverted. Going to revert this patch now. http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.376&r2=1.377 With the patch it does not crash but it has incorrect behavior(*). This reproducer would crash: cat <<HERE | g++ -c -o x.o -g -x c++ -; gdb -nx -readnow ./x.o namespace N { class C { public: typedef void (*t) (C); void m (t); }; typedef C::t u; }; N::u f; HERE Attaching it in .s form to overcome possible g++ differences. It is due to dwarf2_physname() accessing unfinished types being read-in, dwarf2_physname() is not in FSF gdb-7.1 but it is now in FSF GDB HEAD. => It is a regression of current FSF GDB HEAD agains FSF GDB 7.1. (*) The incorrect behavior with that first patch included can be shown on: ------------------------------------------------------------------------------ namespace N { class C { public: typedef void (*t) (C); C (t) {} }; typedef C::t u; u f; C c (f); class CC { public: CC (int) {} } cc (1); }; int main () { return 0; } ------------------------------------------------------------------------------ gcc-4.4.3-4.fc12.x86_64 and g++ (GCC) 4.4.4 20100401 (prerelease) (gdb) p N::c.C Cannot take address of method C. (gdb) p N::cc.CC $1 = {void (N::CC *, int)} 0x4005c4 <N::CC::CC(int)> It is because internally GDB at line fnp->physname = physname ? physname : ""; detects "N::C::C(void (*)())" "N::CC::CC(int)" where "()" should be "(C)". ------------------------------------------------------------------------------ g++ (GCC) 4.5.0 20100401 (experimental) (gdb) p N::c.C $1 = {void (N::C *, N::C::t)} 0x400516 <N::C::C(N::C::t)> (gdb) p N::cc.CC $2 = {void (N::CC *, int)} 0x400524 <N::CC::CC(int)> looks correct but still it does not work: (gdb) ptype N::C::t type = void (*)(void) -- Summary: Crash on NULL TYPE_FIELD_TYPE Product: gdb Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: symtab AssignedTo: unassigned at sourceware dot org ReportedBy: jan dot kratochvil at redhat dot com CC: gdb-prs at sourceware dot org,keiths at redhat dot com GCC target triplet: x86_64-unknown-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=11465 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/11465] Crash on NULL TYPE_FIELD_TYPE 2010-04-01 19:56 [Bug symtab/11465] New: Crash on NULL TYPE_FIELD_TYPE jan dot kratochvil at redhat dot com @ 2010-04-01 19:57 ` jan dot kratochvil at redhat dot com 2010-04-02 9:37 ` jan dot kratochvil at redhat dot com 2010-04-12 19:33 ` keiths at redhat dot com 2 siblings, 0 replies; 5+ messages in thread From: jan dot kratochvil at redhat dot com @ 2010-04-01 19:57 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From jan dot kratochvil at redhat dot com 2010-04-01 19:57 ------- Created an attachment (id=4699) --> (http://sourceware.org/bugzilla/attachment.cgi?id=4699&action=view) The first reproducer as a GDB testcase. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11465 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/11465] Crash on NULL TYPE_FIELD_TYPE 2010-04-01 19:56 [Bug symtab/11465] New: Crash on NULL TYPE_FIELD_TYPE jan dot kratochvil at redhat dot com 2010-04-01 19:57 ` [Bug symtab/11465] " jan dot kratochvil at redhat dot com @ 2010-04-02 9:37 ` jan dot kratochvil at redhat dot com 2010-04-12 19:33 ` keiths at redhat dot com 2 siblings, 0 replies; 5+ messages in thread From: jan dot kratochvil at redhat dot com @ 2010-04-02 9:37 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From jan dot kratochvil at redhat dot com 2010-04-02 09:36 ------- The reason for GDB not crashing on GCC-4.5 output is due to GCC-4.5 producing incomplete debug information, filed as gcc PR debug/43628: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43628 -- http://sourceware.org/bugzilla/show_bug.cgi?id=11465 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug symtab/11465] Crash on NULL TYPE_FIELD_TYPE 2010-04-01 19:56 [Bug symtab/11465] New: Crash on NULL TYPE_FIELD_TYPE jan dot kratochvil at redhat dot com 2010-04-01 19:57 ` [Bug symtab/11465] " jan dot kratochvil at redhat dot com 2010-04-02 9:37 ` jan dot kratochvil at redhat dot com @ 2010-04-12 19:33 ` keiths at redhat dot com 2 siblings, 0 replies; 5+ messages in thread From: keiths at redhat dot com @ 2010-04-12 19:33 UTC (permalink / raw) To: gdb-prs -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at sourceware dot|keiths at redhat dot com |org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed| |1 http://sourceware.org/bugzilla/show_bug.cgi?id=11465 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <bug-11465-4717@http.sourceware.org/bugzilla/>]
* [Bug symtab/11465] Crash on NULL TYPE_FIELD_TYPE [not found] <bug-11465-4717@http.sourceware.org/bugzilla/> @ 2010-12-14 14:28 ` keiths at redhat dot com 0 siblings, 0 replies; 5+ messages in thread From: keiths at redhat dot com @ 2010-12-14 14:28 UTC (permalink / raw) To: gdb-prs http://sourceware.org/bugzilla/show_bug.cgi?id=11465 Keith Seitz <keiths at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2010-08-20 17:16:34 UTC --- Subject: Bug 11465 CVSROOT: /cvs/src Module name: src Changes by: kseitz@sourceware.org 2010-08-20 17:16:15 Modified files: gdb/testsuite : ChangeLog Added files: gdb/testsuite/gdb.dwarf2: pr11465.exp pr11465.S dw2-double-set-die-type.S dw2-double-set-die-type.exp Log message: PR symtab/11465: * gdb.dwarf2/pr11465.exp: New test. * gdb.dwarf2/pr11465.S: New file. * gdb.dwarf2/dw2-double-set-die-type.S: New file. * gdb.dwarf2/dw2-double-set-die-type.exp: New test. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2423&r2=1.2424 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/pr11465.exp.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/pr11465.S.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.S.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp.diff?cvsroot=src&r1=NONE&r2=1.1 --- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2010-08-20 17:17:01 UTC --- Subject: Bug 11465 CVSROOT: /cvs/src Module name: src Changes by: kseitz@sourceware.org 2010-08-20 17:16:45 Modified files: gdb : ChangeLog dwarf2read.c Log message: PR symtab/11465: * dwarf2read.c (struct delayed_method_info): New struct. (struct dwarf2_cu): Add vector method_list. (scan_partial_symbols): Count methods for union, class, structure, and interface types. (add_to_method_list): New function. (free_delayed_list): New function. (compute_delayed_physnames): New function. (process_full_comp_unit): Make a cleanup for the CU's delayed physname list, compute the delayed physnames, and free the the list. (dwarf2_add_member_fn): For C++ and Java, delay the computation of the physname until after the CU is read. * dwarf2read.c (read_structure_type): Check if the current DIE's type was already completed after dwarf2_full_name was called. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12102&r2=1.12103 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.438&r2=1.439 --- Comment #5 from Keith Seitz <keiths at redhat dot com> 2010-12-13 23:51:08 UTC --- I checked in a patch for this a while ago. Time to close the bug report. -- 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] 5+ messages in thread
end of thread, other threads:[~2010-12-13 23:51 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-04-01 19:56 [Bug symtab/11465] New: Crash on NULL TYPE_FIELD_TYPE jan dot kratochvil at redhat dot com 2010-04-01 19:57 ` [Bug symtab/11465] " jan dot kratochvil at redhat dot com 2010-04-02 9:37 ` jan dot kratochvil at redhat dot com 2010-04-12 19:33 ` keiths at redhat dot com [not found] <bug-11465-4717@http.sourceware.org/bugzilla/> 2010-12-14 14:28 ` keiths 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).