News for hackers. Stuff that matters.
Re:Debugging memory corruption: who the hell writes "2" into... by ryao on Wednesday January 01, 2025 @04:22AM (#42564942)
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#...

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://github.com/llvm/llvm-project/issues/121427

There are no comments on this comment yet.