Bug 18464 - unknown value in GNU .note.ABI-tag should not cause a crash
Summary: unknown value in GNU .note.ABI-tag should not cause a crash
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.9
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-29 16:21 UTC by Roland McGrath
Modified: 2015-05-29 17:35 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland McGrath 2015-05-29 16:21:19 UTC
When an executable has a .note.ABI-tag section with vendor "GNU", and a first word (ABI tag value) that is unrecognized, GDB gets an assertion failure (calls internal_error).  This kind of error is inappropriate for diagnosing the content of an input file.  It should be a simple runtime warning instead.
Comment 1 cvs-commit@gcc.gnu.org 2015-05-29 16:32:25 UTC
The master branch has been updated by Roland McGrath <roland@sourceware.org>:

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

commit c8f6c93cb29febd6b8174a20eb35368e70f62faa
Author: Roland McGrath <mcgrathr@chromium.org>
Date:   Fri May 29 09:24:36 2015 -0700

    PR gdb/18464: Do not crash on unrecognized GNU .note.ABI-tag values
    
    Diagnosis of unexpected input (in this case, in an executable file)
    should not crash as if it were a bug in GDB.
    
    gdb/
    	PR gdb/18464
    	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
    	rather than internal_error for an unrecognized value.
Comment 2 cvs-commit@gcc.gnu.org 2015-05-29 17:27:47 UTC
The gdb-7.9-branch branch has been updated by Roland McGrath <roland@sourceware.org>:

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

commit 509cc2cf714f6a194ab27610f4db429579f6090b
Author: Roland McGrath <mcgrathr@chromium.org>
Date:   Fri May 29 09:24:36 2015 -0700

    PR gdb/18464: Do not crash on unrecognized GNU .note.ABI-tag values
    
    Diagnosis of unexpected input (in this case, in an executable file)
    should not crash as if it were a bug in GDB.
    
    gdb/
    	PR gdb/18464
    	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
    	rather than internal_error for an unrecognized value.
    
    (cherry picked from commit c8f6c93cb29febd6b8174a20eb35368e70f62faa)
Comment 3 Roland McGrath 2015-05-29 17:35:06 UTC
Fixed on trunk and 7.9.