3 ms·It can replace any path with undefined behaviour to one that does std::abort.by mgaunard 2y agoIt can replace any path with undefined behaviour to one that does std::abort.pjmlp 2y agoIt can, but in practice no one does it.majoe 2y agoWhen you think about it, that's what -fsanitize=undefined is doing. It detects undefined behaviour at runtime and aborts the program.leni536 2y agoIt detects some, but not all UBs. AFAIK it can't detect UB due to hnsequenced access to the same variable.mgaunard 2y agoThere are different sanitizers that detect different types of UB. Asan, Msan, Tsan and UBSan all detects different ones.deleted 2y ago[deleted]leni536 2y agoWhich is very different from diagnosing at compile time.