From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9120 invoked by alias); 27 Jan 2015 22:42:54 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 9076 invoked by uid 48); 27 Jan 2015 22:42:53 -0000 From: "dje at google dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/17891] New: SIGFPE results in infinite loop? Date: Thu, 29 Jan 2015 11:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00133.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17891 Bug ID: 17891 Summary: SIGFPE results in infinite loop? Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: dje at google dot com I was testing current gdb on a program compiled with Two Level Linetables http://wiki.dwarfstd.org/index.php?title=TwoLevelLineTables and found gdb went into an infinite loop of SIGFPE->handle_sigfpe->SIGFPE ->handle_sigfpe->... The bug for bad line table header version handling is bug 17890. This bug is for the bad SIGFPE handling. How is this supposed to work? Repro: Add a divide-by-zero to gdb after the event loop has been set up, put a breakpoint on handle_sigfpe, run, continue, continue, continue, ... diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 715b090..a4bc9ff 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -17140,6 +17140,9 @@ dwarf_decode_line_header (unsigned int offset, struct dwarf2_cu *cu) struct dwarf2_section_info *section; bfd *abfd; + i = 0; + i = 3/i; + section = get_debug_line_section (cu); dwarf2_read_section (dwarf2_per_objfile->objfile, section); if (section->buffer == NULL) Program received signal SIGFPE, Arithmetic exception. 0x00000000007c688c in dwarf_decode_line_header (offset=0, cu=0x12b5610) at ../../binutils-gdb/gdb/dwarf2read.c:17144 17144 i = 3/i; (top-gdb) c Continuing. Breakpoint 3, handle_sigfpe (sig=8) at ../../binutils-gdb/gdb/event-top.c:1006 1006 mark_async_signal_handler (sigfpe_token); (top-gdb) Continuing. Program received signal SIGFPE, Arithmetic exception. 0x00000000007c688c in dwarf_decode_line_header (offset=0, cu=0x12b5610) at ../../binutils-gdb/gdb/dwarf2read.c:17144 17144 i = 3/i; (top-gdb) Continuing. Breakpoint 3, handle_sigfpe (sig=8) at ../../binutils-gdb/gdb/event-top.c:1006 1006 mark_async_signal_handler (sigfpe_token); (top-gdb) ... -- You are receiving this mail because: You are on the CC list for the bug.