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

Justin Stitt via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 11:53:58 PST 2024


================
@@ -193,7 +193,14 @@ Available checks are:
      signed division overflow (``INT_MIN/-1``), but not checks for
      lossy implicit conversions performed before the computation
      (see ``-fsanitize=implicit-conversion``). Both of these two issues are
-     handled by ``-fsanitize=implicit-conversion`` group of checks.
+     handled by ``-fsanitize=implicit-conversion`` group of checks. Note that
+     ``-fwrapv`` implicitly disables instrumentation for much of the arithmetic
+     covered by ``-fsanitize=signed-integer-overflow``.
+  -  ``-fsanitize=signed-integer-wrap``: Signed Integer wraparound, where the
----------------
JustinStitt wrote:

I agree that the current version is not so clear. I must admit, though, I am not 100% sure what changes you would like. Vitaly, do you think it should be worded like such:

```
Note that ``-fwrapv`` implicitly disables most checks performed by this sanitizer 
as the overflow behavior is well-defined.
```

If this doesn't match what you were thinking could you let me know?

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


More information about the cfe-commits mailing list