This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libsanitizer merge from upstream r221802
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Abdurachmanov <david dot abdurachmanov at gmail dot com>
- Cc: Dmitry Vyukov <dvyukov at google dot com>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Dodji Seketeli <dodji at redhat dot com>, Marek Polacek <polacek at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Yuri Gribov <tetra2005 at gmail dot com>, Alexey Samsonov <samsonov at google dot com>
- Date: Mon, 29 Dec 2014 19:46:41 +0100
- Subject: Re: libsanitizer merge from upstream r221802
- Authentication-results: sourceware.org; auth=none
- References: <CAGQ9bdybHEXUYZ3xCaadBAi5U7mTmGkHK8yweF6Qts5q=yc42Q at mail dot gmail dot com> <20141113091614 dot GB5026 at tucnak dot redhat dot com> <CACT4Y+YiHMyvg_N+0K+X+Y7R3NzzbUvae_J1MqQG0nTR-qNU=g at mail dot gmail dot com> <71E9E6B2-2D35-4F25-997A-086EC1005423 at gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Dec 29, 2014 at 07:36:42PM +0100, David Abdurachmanov wrote:
> I believe this is breaking bootstrap on aarch64-linux-gnu with kernels <=3.15,
> 3.16 and above are fine.
>
> __kernel_old_{gid,uid}_t were changed in 3.16 from unsigned int to unsigned
> short. <=3.15 kernel will trigger static asserts in libsanitizer while
> compiling GCC.
>
> I created PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64435 (includes all
> the details).
>
> Attaching a patch with resolved issues on F19 + 3.12 kernel (also bootstrapped
> in QEMU with F21 rootfs + 3.17 kernel) on aarch64-linux-gnu.
That looks very much wrong, ABI can't depend on what kernel headers you are
compiling against.
So, better would be just to ifdef out the check and always use 16-bit
__kernel_old_*_t on aarch64. Are the
getresuid16/getresgid16/getgroups16/setgroups16 syscalls wired at all on
aarch64? If not, then supposedly the sanitizer_common_syscalls.inc stuff
for these syscalls should be ifdefed out on aarch64 (or any other arch that
doesn't have those syscalls).
Jakub