News for hackers. Stuff that matters.
Re:Clang vs. Clang by GTP on Sunday August 04, 2024 @05:59AM (#41152374)
We can debate whether it's reasonable or not to optimize code based on undefined behavior. But we should at least have the compiler emit a warning when this happens. Just like we have the notorious "x makes an integer from a pointer without a cast", we could have warnings for when the compiler decides to not emit the code for an if branch checking for a null pointer or an instruction zeroing some memory right before deallocation (I think this is not UB, but still a source of security issues due to extreme optimizations).

There are no comments on this comment yet.