From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64980 invoked by alias); 20 Oct 2015 11:56:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 64802 invoked by uid 89); 20 Oct 2015 11:56:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham 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; Tue, 20 Oct 2015 11:56:49 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 505B531AC9D; Tue, 20 Oct 2015 11:56:48 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-53.ams2.redhat.com [10.36.116.53]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9KBukMG010035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 20 Oct 2015 07:56:47 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id t9KBuiP7024377; Tue, 20 Oct 2015 13:56:44 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id t9KBuhaW024376; Tue, 20 Oct 2015 13:56:43 +0200 Date: Tue, 20 Oct 2015 12:02:00 -0000 From: Jakub Jelinek To: Maxim Ostapenko Cc: Kostya Serebryany , GCC Patches , Dmitry Vyukov , Marek Polacek , Yury Gribov , Slava Garbuzov , Vyacheslav Barinov Subject: Re: [PATCH v2 2/6] Libsanitizer merge from upstream r250806 (was r249633). Message-ID: <20151020115643.GA478@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <56262292.3030803@partner.samsung.com> <56262357.3000503@partner.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56262357.3000503@partner.samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01866.txt.bz2 On Tue, Oct 20, 2015 at 02:19:51PM +0300, Maxim Ostapenko wrote: > + a) Location's filename must not be NULL. > + b) Location's filename must not be equal to "". > + c) Location's filename must not be equal to "\1". > + d) First two bytes of filename msut not contain '\xff' symbol. */ must > + > +static bool > +ubsan_use_new_style_p (location_t loc) > +{ > + if (loc == UNKNOWN_LOCATION) > + return false; > + > + expanded_location xloc = expand_location (loc); > + if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 > + || strncmp (xloc.file, "", 1) == 0 || xloc.file[0] == '\xff' I'd use || xloc.file == '\0' || xloc.file[0] == '\xff instead, but not a big deal for me. > + || xloc.file[1] == '\xff') > + return false; > + > + return true; > +} > + Ok with the typo fix. Jakub