2 ms·
That would not catch this. This is technically undefined behavior, but UBSAN does not have a check for this: https://clang.llvm.org/docs/UndefinedBehaviorSanit
by ryao 2y ago
That would not catch this. This is technically undefined behavior, but UBSAN does not have a check for this:
https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#ubsan-checks https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...
What would catch this would be a C++ compiler warning. I filed bug reports against both GCC and LLVM asking for one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263
https://github.com/llvm/llvm-project/issues/121427 https://github.com/llvm/llvm-project/issues/121427