2 ms·
Indeed the ubsan sanitizer is designed to catch undefined behavior while compiling and is designed to emit an error when it founds code that hits undefined beha
by ithkuil 7y ago
Indeed the ubsan sanitizer is designed to catch undefined behavior while compiling and is designed to emit an error when it founds code that hits undefined behaviour, statically.
Yet, this patch is fun answer to those people who are annoyed by the number of errors that running their codebase through ubsan will produce and might think "that's just for edge cases, I'm pretty sure in practice I'll never hit effects of those at runtime". Compile with ubsan_bel and listen in horror how often it actually happens....
> Yes, this is April 1st and the patch isn't particularly serious.
- comex 7y agoPretty sure that's not true. Clang has a static analyzer, but UBSan is not part of that; it's a purely dynamic analysis that detects issues at runtime.