Bug 18464

Summary: unknown value in GNU .note.ABI-tag should not cause a crash
Product: gdb Reporter: Roland McGrath <roland>
Component: gdbAssignee: Roland McGrath <roland>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.9   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

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 Sourceware Commits 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 Sourceware Commits 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.