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

Kees Cook via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 14 18:01:11 PST 2024


kees wrote:

> Sure -fwrapv makes wraparound defined, but it doesn't prevent us from making -fsanitize=signed-integer-overflow useful. "-fwrapv => no signed-integer-overflow" is not a solid argument.
> 
> I think we can try making -fsanitize=signed-integer-overflow effective even when -fwrapv if specified. -fsanitize=signed-integer-overflow is rare in the wild, probably rarer when combined with -fwrapv.
.

In earlier GCC discussions, it seemed very much like the `-fsanitize=signed-integer-overflow` was meant for UB only, but maybe I misunderstood. See replies leading up to this:
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630578.html

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


More information about the cfe-commits mailing list