[clang] [compiler-rt] [UBSan] Add check that detects division by zero for fixed-point types (PR #165181)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 26 18:14:41 PDT 2026


================
@@ -149,7 +151,7 @@ SANITIZER("shadow-call-stack", ShadowCallStack)
 // ABI or address space layout implications, and only catch undefined behavior.
 SANITIZER_GROUP("undefined", Undefined,
                 Alignment | Bool | Builtin | ArrayBounds | Enum |
-                    FloatCastOverflow |
+                    FixedPoint | FloatCastOverflow |
----------------
vitalybuka wrote:

Usually we put into "undefined" only stuff which clearly violates the standard.
We have other checks which are not not part of "undefined".
Not sure how to deal with extension.
I propose to keep it opt-in for at least one major version and reconsider later.


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


More information about the cfe-commits mailing list