Bug 22186 - divide-by-zero in decode_line_info (dwarf2.c)
Summary: divide-by-zero in decode_line_info (dwarf2.c)
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.30
: P2 normal
Target Milestone: 2.30
Assignee: Alan Modra
URL:
Keywords:
: 22192 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-22 09:58 UTC by Agostino Sarubbo
Modified: 2017-09-24 06:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2017-09-23 00:00:00


Attachments
stacktrace (546 bytes, text/plain)
2017-09-22 09:58 UTC, Agostino Sarubbo
Details
testcase (11.41 KB, application/octet-stream)
2017-09-22 09:59 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo 2017-09-22 09:58:35 UTC
Created attachment 10459 [details]
stacktrace

On master compiled on 20170921
# nm -V
GNU nm (Gentoo git) 2.29.51.20170921


Command to reproduce:
# nm -A -a -l -S -s --special-syms --synthetic --with-symbol-versions -D $FILE
Comment 1 Agostino Sarubbo 2017-09-22 09:59:30 UTC
Created attachment 10460 [details]
testcase
Comment 2 Alan Modra 2017-09-23 10:29:21 UTC
*** Bug 22192 has been marked as a duplicate of this bug. ***
Comment 3 Sourceware Commits 2017-09-24 06:50:24 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit d8010d3e75ec7194a4703774090b27486b742d48
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Sep 24 14:36:48 2017 +0930

    PR22186, divide-by-zero in decode_line_info
    
    	PR 22186
    	* dwarf2.c (decode_line_info): Fail on lh.line_range of zero
    	rather than dividing by zero.
Comment 4 Alan Modra 2017-09-24 06:59:21 UTC
Fixed