Earlier quoted context omitted.
UB can easily wipe "the drive" on my microcontroller by sending a wrong SPI command to the flash chip, or by messing with write unprotected memory mapped built in flash. Welcome to kernel code. I believe one could make it play DOOM by clever malice in this case.
We need a doomcc that will replace all undefined behavior with doom. A more fun version of ubsan if you will.
> When a C or C++ program triggers undefined behavior, anything is allowed to happen in the program execution. And by anything, I really mean anything: The program can crash with an error message, it can silently corrupt data, it can morph into a colorful video game, or it can even give the right result.
-- https://www.nayuki.io/page/undefined-behavior-in-c-and-cplus...