logoalt Hacker News

SAI_Peregrinusyesterday at 5:20 PM1 replyview on HN

It's indistinguishable from unspecified behavior, not from undefined behavior. Unspecified behavior has to pick from a finite list of allowed behaviors. Undefined behavior can do anything.


Replies

jstimpfleyesterday at 9:58 PM

A program with corrupted state can essentially do anything. Yes it's still a question of run-time checks the runtime has to protect against it. But the compiler is probably deriving a lot of assumptions from the assumption that there wasn't overflow.