This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Request to merge Undefined Behavior Sanitizer in
- From: Marek Polacek <polacek at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Jason Merrill <jason at redhat dot com>
- Date: Mon, 29 Jul 2013 11:09:31 +0200
- Subject: Re: Request to merge Undefined Behavior Sanitizer in
- References: <20130725153227 dot GC32538 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1307252236460 dot 24818 at digraph dot polyomino dot org dot uk> <51F20006 dot 6040705 at redhat dot com>
On Thu, Jul 25, 2013 at 10:50:14PM -0600, Jeff Law wrote:
> On 07/25/2013 04:40 PM, Joseph S. Myers wrote:
> >On Thu, 25 Jul 2013, Marek Polacek wrote:
> >
> >>So far it sanitizes division-by-zeros, shifts and
> >>__builtin_unreachable calls. This is of course far from being
> >>complete; I intend to write more features during this 4.9 stage.
> >
> >Such as everything needed for it to replace -ftrapv (for -ftrapv to become
> >an alias for an appropriate subset of this option)?
> I'm guessing Marek would probably start with looking to provide
> feature parity with LLVM's -fsanitize=undefined which is defined as:
>
> -fsanitize=undefined: Fast and compatible undefined behavior
> checker. Enables the undefined behavior checks that have small
> runtime cost and no impact on address space layout or ABI. This
> includes all of the checks listed below other than
> unsigned-integer-overflow.
>
> So I wouldn't necessarily expect ubsan, at least in the near future,
> to catch the -ftrapv stuff. Though it's something that might be
> able to be added at some point.
Yeah, exactly. I expect to get back to -ftrapv after providing
the most useful subset of LLVM's ubsan functionality.
Marek