This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Implement Undefined Behavior Sanitizer
- From: Richard Smith <richard at metafoo dot co dot uk>
- To: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Andrew Pinski <pinskia at gmail dot com>, Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 6 Jun 2013 03:23:54 -0700
- Subject: Re: [RFC] Implement Undefined Behavior Sanitizer
- References: <20130605175728 dot GD4160 at redhat dot com> <CA+=Sn1nFBaZdXj6X+EAc3gzd-Nvky=OGo2Ja-z37qmrV1txD-w at mail dot gmail dot com> <20130605192308 dot GW1493 at tucnak dot redhat dot com> <CA+=Sn1m881terhbJB8vMp9fu+U0FQb24B6AbX1dUqEyimEVDGA at mail dot gmail dot com> <CAGQ9bdxzDRYkKxy+T2V9zTgai8TatPXtQmBRMkArhN5f5CSS-w at mail dot gmail dot com> <20130606082107 dot GZ1493 at tucnak dot redhat dot com> <CA+=Sn1=E+L54V17H38sA3gcEBxH7L8LjHk_FTSHB2i_eqf6B1g at mail dot gmail dot com> <CAGQ9bdx+vJh49sQxmwm9T-TPX0pxpDnK52u0zG8YmbhAcH6wFA at mail dot gmail dot com> <20130606084453 dot GB1493 at tucnak dot redhat dot com> <CAGQ9bdzj3p0Bo7CZRLQZSjwWUFJczjiR3OV2dBM9D-p30KXJTQ at mail dot gmail dot com> <CAOfiQqkyXWpS-hM=FONEsZqSaWhd3UmUHb=sD71Cb96Df7er4w at mail dot gmail dot com>
[Resending with less text/html]
On Thu, Jun 6, 2013 at 1:55 AM, Konstantin Serebryany
<konstantin.s.serebryany@gmail.com> wrote:
> On Thu, Jun 6, 2013 at 12:44 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Thu, Jun 06, 2013 at 12:41:56PM +0400, Konstantin Serebryany wrote:
> >> As for libstdc++, I completely agree, we don't want to depend on it,
> >> and we don't.
> >
> > ubsan actually needs
> > U _ZTIN10__cxxabiv117__class_type_infoE@@CXXABI_1.3
> > U _ZTIN10__cxxabiv120__si_class_type_infoE@@CXXABI_1.3
> > U _ZTIN10__cxxabiv121__vmi_class_type_infoE@@CXXABI_1.3
> > U _ZTISt9type_info@@GLIBCXX_3.4
> > U __dynamic_cast@@CXXABI_1.3
>
> These things are needed only for the C++-specific undefined behavior checking.
> At least, if I compile a C test using clang -fsanitize=undefined I
> don't see any of these.
>
> Richard, am I right?
Yes. We build two different runtimes, one which needs these bits (for
C++) and one which doesn't (for C).
Adding __extension__ to the __int128 typedefs is fine too.