Bug 22167 - NULL pointer dereference in scan_unit_for_symbols (dwarf2.c)
Summary: NULL pointer dereference in scan_unit_for_symbols (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:
Depends on:
Blocks:
 
Reported: 2017-09-21 13:07 UTC by Agostino Sarubbo
Modified: 2017-09-24 06:57 UTC (History)
0 users

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


Attachments
stacktrace (636 bytes, text/plain)
2017-09-21 13:07 UTC, Agostino Sarubbo
Details
testcase (11.28 KB, application/x-executable)
2017-09-21 13:08 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-21 13:07:30 UTC
Created attachment 10438 [details]
stacktrace

On master compiled today.
# 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-21 13:08:27 UTC
Created attachment 10439 [details]
testcase
Comment 2 Sourceware Commits 2017-09-24 06:49:50 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit 0d76029f92182c3682d8be2c833d45bc9a2068fe
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Sep 24 14:35:33 2017 +0930

    PR22167, NULL pointer dereference in scan_unit_for_symbols
    
    	PR 22167
    	* dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
Comment 3 Alan Modra 2017-09-24 06:57:25 UTC
Fixed