Bug 22201 - DW_AT_name with out of bounds reference
Summary: DW_AT_name with out of bounds reference
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-25 08:04 UTC by Agostino Sarubbo
Modified: 2017-09-25 14:30 UTC (History)
0 users

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


Attachments
stacktrace (675 bytes, text/plain)
2017-09-25 08:04 UTC, Agostino Sarubbo
Details
testcase (8.29 KB, application/x-executable)
2017-09-25 08:04 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:04:35 UTC
Created attachment 10471 [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:04:56 UTC
Created attachment 10472 [details]
testcase
Comment 2 Sourceware Commits 2017-09-25 13:17:39 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

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

    PR22201, DW_AT_name with out of bounds reference
    
    DW_AT_name ought to always have a string value.
    
    	PR 22201
    	* dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
    	has string form.
    	(parse_comp_unit): Likewise.
Comment 3 Alan Modra 2017-09-25 14:30:31 UTC
Fixed