From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88894 invoked by alias); 29 May 2015 10:07:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88117 invoked by uid 89); 29 May 2015 10:07:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 29 May 2015 10:07:45 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id CB5EBBBB37; Fri, 29 May 2015 10:07:44 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4TA7hw5030864; Fri, 29 May 2015 06:07:44 -0400 Message-ID: <55683A6F.2030600@redhat.com> Date: Fri, 29 May 2015 10:07:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Roland McGrath , GDB Subject: Re: [PATCH users/roland/osabi-assert] Do not crash on unrecognized GNU .note.ABI-tag values References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00707.txt.bz2 On 05/29/2015 01:21 AM, Roland McGrath wrote: > Diagnosis of unexpected input (in this case, in an executable file) > should not crash as if it were a bug in GDB. Indeed. > This one is especially > harmless, since the "osabi" has so little effect on anything. It's used to pick the right gdbarch for the inferior. > > OK for trunk and 7.9 branch? In order to get this into a release branch, the protocol is to file a PR and then once fixed, list the fix in the release page in the wiki: https://sourceware.org/gdb/wiki/GDB_7.9_Release That helps the release manager build the release notes. > gdb/ > 2015-05-28 Roland McGrath > > * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning > rather than internal_error for an unrecognized value. > > diff --git a/gdb/osabi.c b/gdb/osabi.c > index 9d90c55..abf4bd4 100644 > --- a/gdb/osabi.c > +++ b/gdb/osabi.c > @@ -493,10 +493,9 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd > *abfd, asection *sect, void *obj) > break; > > default: > - internal_error (__FILE__, __LINE__, > - _("generic_elf_osabi_sniff_abi_tag_sections: " > - "unknown OS number %d"), > - abi_tag); > + warning ("GNU ABI tag value %u unrecognized.\n", abi_tag); Wrap string in _(). Indentation looks odd. tabs vs spaces? (We use tabs in gdb.) > + *osabi = GDB_OSABI_UNKNOWN; This line is not necessary. It if were, we'd need to do the same in the other two paths that don't match anything in this function too. OK with those fixed. > + break; > } > return; > } Thanks, Pedro Alves