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