From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1867 invoked by alias); 29 Dec 2014 18:36:53 -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 1849 invoked by uid 89); 29 Dec 2014 18:36:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 29 Dec 2014 18:36:50 +0000 Received: by mail-wi0-f182.google.com with SMTP id h11so22781427wiw.9 for ; Mon, 29 Dec 2014 10:36:47 -0800 (PST) X-Received: by 10.194.205.138 with SMTP id lg10mr83135240wjc.130.1419878207431; Mon, 29 Dec 2014 10:36:47 -0800 (PST) Received: from davids-macbook-fritz-box.fritz.box (adsl-84-227-252-151.adslplus.ch. [84.227.252.151]) by mx.google.com with ESMTPSA id o2sm40467622wiy.11.2014.12.29.10.36.45 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Dec 2014 10:36:46 -0800 (PST) From: David Abdurachmanov Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/signed; boundary="Apple-Mail=_C05EE97F-31A4-4B2F-9FFA-E67AB7A5FD25"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: libsanitizer merge from upstream r221802 Date: Mon, 29 Dec 2014 18:36:00 -0000 In-Reply-To: To: Dmitry Vyukov , Jakub Jelinek , Konstantin Serebryany , GCC Patches , Dodji Seketeli , Marek Polacek , "H.J. Lu" , Yuri Gribov , Alexey Samsonov References: <20141113091614.GB5026@tucnak.redhat.com> Message-Id: <71E9E6B2-2D35-4F25-997A-086EC1005423@gmail.com> X-SW-Source: 2014-12/txt/msg01934.txt.bz2 --Apple-Mail=_C05EE97F-31A4-4B2F-9FFA-E67AB7A5FD25 Content-Type: multipart/mixed; boundary="Apple-Mail=_0C03F8D3-1BC2-400F-A31B-2AEF7E08F1FE" --Apple-Mail=_0C03F8D3-1BC2-400F-A31B-2AEF7E08F1FE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Content-length: 527 Hi, I believe this is breaking bootstrap on aarch64-linux-gnu with kernels <=3D= 3.15, 3.16 and above are fine. __kernel_old_{gid,uid}_t were changed in 3.16 from unsigned int to unsigned short. <=3D3.15 kernel will trigger static asserts in libsanitizer while compiling GCC. I created PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64435 (include= s all the details). Attaching a patch with resolved issues on F19 + 3.12 kernel (also bootstrap= ped in QEMU with F21 rootfs + 3.17 kernel) on aarch64-linux-gnu. david --Apple-Mail=_0C03F8D3-1BC2-400F-A31B-2AEF7E08F1FE Content-Disposition: attachment; filename=gcc-pr64435.patch Content-Type: application/octet-stream; name="gcc-pr64435.patch" Content-Transfer-Encoding: 7bit Content-length: 1508 diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 8b2eb82..8e5aaa0 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,10 @@ +2014-12-29 David Abdurachmanov + + PR sanitizer/64435 + * sanitizer_common/sanitizer_platform_limits_posix.h: Include linux/version.h + for Linux, set __sanitizer___kernel_old_{uid,gid}_t to unsigned int for + <=3.15 kernel. + 2014-12-16 Jakub Jelinek * sanitizer_common/sanitizer_symbolizer_libbacktrace.cc, diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h index 139fe0a..0cc3c3e 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h @@ -16,6 +16,10 @@ #include "sanitizer_internal_defs.h" #include "sanitizer_platform.h" +#if SANITIZER_LINUX +#include +#endif + namespace __sanitizer { extern unsigned struct_utsname_sz; extern unsigned struct_stat_sz; @@ -470,7 +474,9 @@ namespace __sanitizer { typedef long __sanitizer___kernel_off_t; #endif -#if defined(__powerpc__) || defined(__mips__) +#if defined(__powerpc__) || defined(__mips__) \ + || (defined(__aarch64__) && SANITIZER_LINUX \ + && LINUX_VERSION_CODE <= KERNEL_VERSION(3, 15, 0)) typedef unsigned int __sanitizer___kernel_old_uid_t; typedef unsigned int __sanitizer___kernel_old_gid_t; #else --Apple-Mail=_0C03F8D3-1BC2-400F-A31B-2AEF7E08F1FE Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Content-length: 1 --Apple-Mail=_0C03F8D3-1BC2-400F-A31B-2AEF7E08F1FE-- --Apple-Mail=_C05EE97F-31A4-4B2F-9FFA-E67AB7A5FD25 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail Content-length: 801 -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJUoZ86AAoJEOSR6MNq2q1PsZQP/iI517JcsjCKVHjF6s9lRuCi Vffl1u8Fl4fXpmlLcJSijuiOp33P8oCVOPOwPmK/STY9Ai85XMTKjdh+5o4FEk6F 6qt9qfPWIYgcuHVafYRSW+kpXgLl6IecCIwLEpbFjoe/kfif8Ul3cs7UJM2+sN3Y 66VJppjGlYSeVuxrQX/rGgU+kmd7dtPi+vmKcrH5HkNRJ2tj1942tSFyKVPcC5ax /M5ytNft5WDTCOuHT86i5IGv/FaX68w65djNOC/f/eekaCU4K2fIZraQsmEOkIY5 JTwT5Xhdnx9uN57dCJ9R+TEkzu7DojUH29H3DB/qDRrFzjXLaacBSKdJjpUaDqNv ybnCboGipo67wvY1CXkUct8utZohojIqPpFikNvCpTEyiPUeE1JzLjzU3Q+qMGQv qiExefdnew8yy78dUVLREz72rAFclmlQvGSUKGhBJcIBwr70AJ7zUr3VHJz553ye WC9XDa27OaHLUeEqKbOkvwUYqGX2WDlgDe1lFdsa/XvhMmvnrCt0YTvPG1sGEBW1 J6fKEgVIfb2oce7KOxEt4gtvip39eTBpMnD6Ch9SDMYPrw9C2zIlSvJDlTogX3eD CMlYttLpAT4NeOEoroCpsB9HGHg4heOgUqNYczesijoNk5LxEn13PZzYbSrcCYoN rB4FpjAkfBOOJIamRcwF =rH90 -----END PGP SIGNATURE----- --Apple-Mail=_C05EE97F-31A4-4B2F-9FFA-E67AB7A5FD25--