This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libsanitizer merge from upstream r208536
- From: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Andrew Pinski <pinskia at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Dodji Seketeli <dodji at redhat dot com>, Dmitry Vyukov <dvyukov at google 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>
- Date: Thu, 15 May 2014 12:05:04 +0400
- Subject: Re: libsanitizer merge from upstream r208536
- Authentication-results: sourceware.org; auth=none
- References: <CAGQ9bdxH9rh0Cz8LBYZsuHKEFpkVosNkX2qrX10RGwK5hFEEqg at mail dot gmail dot com> <CA+=Sn1m56D1L6mfAcBWya+Pus2py=r0U8GC08MY6RrDhBJvWKw at mail dot gmail dot com> <CAGQ9bdyTjtxbdH9Ey-tyvce1B7eNQmSrvnRv9uTCw8y8L5y-Qw at mail dot gmail dot com> <53745088 dot 2060603 at samsung dot com>
On Thu, May 15, 2014 at 9:28 AM, Yury Gribov <y.gribov@samsung.com> wrote:
> On 05/14/2014 08:51 AM, Konstantin Serebryany wrote:
>>>
>>> One theme I have been noticing in the libsanitizer code is that it has
>>> all of the knowledge of glibc when it comes to syscalls but makes some
>>> bad assumptions dealing with some structures. For an example on MIPS
>>> n64: stat and stat64 are different layout between user and kernel.
>>> Don't ask, it is a historical mistake.
>>>
>>> Also it really forces target maintainers to maintain both glibc and
>>> libsanitizer code. ILP32 on aarch64 has some similar issues as x32
>>> and MIPS n32.
>>> Even Linus is pushing new 32bit targets to go the route of 64bit time
>>> which is means libsanitizer code becomes even more complex.
>>
>>
>> This is indeed a PITA.
>> It is caused by our need to avoid even greater PITA of including
>> system headers into the sanitizer files
>> (we allow system #includes only in a handful of files).
>
>
> Have you considered adding a configure-like step to your build process to
> determine necessary sizes and then provide them to sanitizer files via some
> config.h?
No. We have to support too many build systems and hence do not want
any configure step.
All configuration has to be done in the sources.