Aliasing Redefined
summary
Code that type-puns network buffers currently compiles to nothing but invokes undefined behavior; a zero‑code trick is shown that tells the compiler the pun is real but still breaks when mutating a read buffer and when enforcing const correctness. Proposed fixes mentioned include stood bit cast and an implicit object-creation paper called stood bless, but neither fully solves efficient multi-type access for generated handlers that must interpret the same large packet as many views without copying — unions blow up with 1.5 MB packets against 200 B messages.
AI-written summary · about
related talks
01h 00mType punning in modern C++
01h 05mType Punning in C++17: Avoiding Pun-defined Behavior
49mUndefined Behavior in 2017 (part 1 of 2)
46m“My Little Optimizer: Undefined Behavior is Magic"
54mUndefined Behaviour is awesome!
37mDealing with aliasing using contracts
58mGarbage In, Garbage Out: Arguing about Undefined Behavior...
55mNew Bytecodes, New Objects
