Comment

Comment by mtlmtlmtlmtl

I think this is a common misunderstanding about UB. It's not that anything can happen, just that the standard doesn't specify what happens, meaning whatever happens is compiler/architecture/OS dependent. So you can't depend on UB in portable code. But something definite will happen, given the current state of the system. After all, if it didn't, these things wouldn't be exploitable either.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton