3 ms·
> [whatever] is undefined behaviour, which means the compiler is allowed to assume it never happens; That interpretation is the root of the problem. Compilers
by pygy_ 4y ago
> [whatever] is undefined behaviour, which means the compiler is allowed to assume it never happens;
That interpretation is the root of the problem. Compilers authors use it to implement outright user hostile behavior in the name of elusive performance.
Why would you spend resources looking for zero days when you can have a few LLVM contributors plant them in every program "as an optimization"?
- Narishma 4y agoSo why not use a different compiler?
- pygy_ 4y agoWould you write it? You can use the same compiler with a language whose design committee isn't deliberately user hostile, like Rust (where UB-like behaviors in safe code are considered soundness bugs). https://runrust.miraheze.org/wiki/Undefined_Behavior https://runrust.miraheze.org/wiki/Undefined_Behavior
- saagarjha 4y agoRust makes guarantees for safe code that undefined behavior would violate. C(++) has no such mode and as such a comparison cannot be made.