Bug 22200 - NULL pointer dereference in concat_filename (dwarf2.c)
Summary: NULL pointer dereference in concat_filename (dwarf2.c)
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.30 (HEAD)
: P2 normal
Target Milestone: 2.30
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-25 08:01 UTC by Agostino Sarubbo
Modified: 2017-09-25 14:29 UTC (History)
0 users

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


Attachments
stacktrace (633 bytes, text/plain)
2017-09-25 08:01 UTC, Agostino Sarubbo
Details
testcase (10.61 KB, application/octet-stream)
2017-09-25 08:02 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-25 08:01:53 UTC
Created attachment 10469 [details]
stacktrace

On master at 52a93b95ec0771c97e26f0bb28630a271a667bd2:
# nm -V
GNU nm (Gentoo git) 2.29.51.20170924


Command to reproduce:
# nm -A -a -l -S -s --special-syms --synthetic --with-symbol-versions -D $FILE
Comment 1 Agostino Sarubbo 2017-09-25 08:02:14 UTC
Created attachment 10470 [details]
testcase
Comment 2 cvs-commit@gcc.gnu.org 2017-09-25 13:17:34 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit c361faae8d964db951b7100cada4dcdc983df1bf
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Sep 25 19:03:46 2017 +0930

    PR22200, DWARF5 .debug_line sanity check
    
    The format_count entry can't be zero unless the count is also zero.
    
    	PR 22200
    	* dwarf2.c (read_formatted_entries): Error on format_count zero.
Comment 3 Alan Modra 2017-09-25 14:29:57 UTC
Fixed