From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53140 invoked by alias); 24 Nov 2015 08:25:34 -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 53123 invoked by uid 89); 24 Nov 2015 08:25:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_20,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, 24 Nov 2015 08:25:32 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6975815447; Tue, 24 Nov 2015 08:25:31 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAO8PTU7011334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 24 Nov 2015 03:25:30 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tAO8PRgU014680; Tue, 24 Nov 2015 09:25:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tAO8PNCI014679; Tue, 24 Nov 2015 09:25:23 +0100 Date: Tue, 24 Nov 2015 08:30:00 -0000 From: Jakub Jelinek To: Maxim Ostapenko Cc: Christophe Lyon , Kostya Serebryany , GCC Patches , Yury Gribov , Vyacheslav Barinov , Slava Garbuzov , Adhemerval Zanella Subject: Re: [PATCH 1/2] Libsanitizer merge from upstream r253555. Message-ID: <20151124082523.GK5675@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <5652C3E0.4030000@partner.samsung.com> <5652C459.8090500@partner.samsung.com> <20151123080753.GS5675@tucnak.redhat.com> <565307B5.3000901@partner.samsung.com> <20151123124112.GA5675@tucnak.redhat.com> <565312DE.2020207@partner.samsung.com> <20151123132411.GB5675@tucnak.redhat.com> <565416E9.3080905@partner.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <565416E9.3080905@partner.samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02832.txt.bz2 On Tue, Nov 24, 2015 at 10:51:05AM +0300, Maxim Ostapenko wrote: > Ok, I posted a fix to upstream (http://reviews.llvm.org/D14921) yesterday, > but it's still not reviewed. So, I'm wondering if I should fix the issue > locally? > Attaching proposed fix following Jakub's suggestion. > > Christophe could you try the patch? > diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog > index b97fc7d..c392c57 100644 > --- a/libsanitizer/ChangeLog > +++ b/libsanitizer/ChangeLog > @@ -1,3 +1,7 @@ > +2015-11-24 Maxim Ostapenko > + > + * include/system/linux/asm/ptrace.h: New header. > + > 2015-11-23 Maxim Ostapenko > > * All source files: Merge from upstream r253555. > diff --git a/libsanitizer/include/system/linux/asm/ptrace.h b/libsanitizer/include/system/linux/asm/ptrace.h > new file mode 100644 > index 0000000..dbdd58b > --- /dev/null > +++ b/libsanitizer/include/system/linux/asm/ptrace.h > @@ -0,0 +1,8 @@ > +#include_next > +#if defined(__arm__) > +#ifndef ARM_VFPREGS_SIZE > +/* The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS > + and core dumps. */ > +#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) > +#endif > +#endif You could have just used #if defined(__arm__) && !defined(ARM_VFPREGS_SIZE) or #ifdef __arm__ or #if !defined(ARM_VFPREGS_SIZE). Mixing if defined with ifndef on the next line is just weird. And, you should mention which kernel version introduced ARM_VFPREGS_SIZE macro (I believe it was 2011-ish, but have not checked exact kernel version). Jakub