[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 12:16:02 PST 2024


vitalybuka wrote:

> > > Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? I suspect it's just overlook, and not intentional behavior.
> > 
> > 
> > +1
> > We should consider this direction
> 
> The UB-vs-non-UB seemed to be a really specific goal in the existing code. i.e. that the sanitizer was disabled didn't look like an accident. For people using this to find _only_ UB, this would be a behavioral change, so to me it seems like a separate name makes the most sense. Anyone wanting wrap-around checking can use -wrap, and anyone wanting UB checking can use -overflow.

Isn't this still UB even with -fwrapv? UB is a language feature, not compiler.

https://github.com/llvm/llvm-project/pull/80089


More information about the llvm-commits mailing list