logoalt Hacker News

steveklabnikyesterday at 7:15 PM1 replyview on HN

It is undefined behavior. You cannot make a claim about what it will always do.


Replies

AlotOfReadingtoday at 1:05 AM

As a fun example, I worked on a safety-critical system where accessing all-bits-zero pointers would trigger an IRQ that jumped back to PC + 4, leaving the register/variable uninitialized. Great fun was had any time there was LR corruption and CPU started executing whatever happened to be next in memory after function return.