3 ms·
> but the sanitizer didn't detect the UB. Isn't this because the sanitizer works with the instrumented "optimized" code, which does no longer invoke UB? Or is
by _pmf_ 9y ago
> but the sanitizer didn't detect the UB.
Isn't this because the sanitizer works with the instrumented "optimized" code, which does no longer invoke UB? Or is the clang toolchain intelligent enough to not perform UB dependent optimizations when the sanitizer is specified?
- umanwizard 9y agoWhat would it even mean for compiled, machine language code to invoke UB or not? UB is mostly a C concept, not a lower-level one. The semantics of assembly language programs are well-defined much more often (the only counterexample I can think of is stuff involving using threading, memory barriers, etc. incorrect)