At first glance, signed divide overflow seems similar to other forms of signed overflow, but it's significantly different: it's the only form of signed overflow that is not affected by -fwrapv, it has undefined behavior at the LLVM IR level, and it can trigger trap on x86. Given that, make ubsan trigger on signed divide overflow even if a type is marked __ob_wrap.
260 KiB
260 KiB