Bug 17890 - gdb needs to punt when it sees a dwarf line table version it doesn't understand
Summary: gdb needs to punt when it sees a dwarf line table version it doesn't understand
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 22:36 UTC by dje
Modified: 2015-01-29 18:33 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 dje 2015-01-27 22:36:03 UTC
I'm currently adding support for Two Level Linetables,
and noticed gdb going into an infinite loop on programs
compiled with them.
http://wiki.dwarfstd.org/index.php?title=TwoLevelLineTables

There are two bugs here:

1) gdb should punt when it sees a line table header version it doesn't
   understand.  The format could be different, there could be new fields
   or whatever, and blindly continuing is asking for trouble.

2) with the line table errantly read some fields like lh->range are
   getting a value of zero resulting in a SIGFPE (divide-by-zero).
   GDB's handling of SIGFPE it to mark the event with the async handler
   and return.  Eh?
   This results in an infinite loop of SIGFPE->handle_sigfpe->SIGFPE
   ->handle_sigfpe->...
   [filed as a separate bug, the number to be recorded once I know it]
Comment 1 cvs-commit@gcc.gnu.org 2015-01-29 18:28:58 UTC
The master branch has been updated by Doug Evans <devans@sourceware.org>:

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

commit cd366ee8c6ca1dfe8aa11540402904b64775b208
Author: Doug Evans <dje@google.com>
Date:   Thu Jan 29 10:26:38 2015 -0800

    PR symtab/17890
    
    gdb/ChangeLog:
    
    	PR symtab/17890
    	* dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.
Comment 2 cvs-commit@gcc.gnu.org 2015-01-29 18:33:17 UTC
The gdb-7.9-branch branch has been updated by Doug Evans <devans@sourceware.org>:

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

commit 0a3f9dcee8f15d634b742ad69d3c78a067a1ed2c
Author: Doug Evans <dje@google.com>
Date:   Thu Jan 29 10:31:21 2015 -0800

    PR symtab/17890
    
    gdb/ChangeLog:
    
    	PR symtab/17890
    	* dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.