News for hackers. Stuff that matters.
Re:So you think you know C? by jhomedall on Thursday November 10, 2016 @09:47AM (#12920762)
I know exactly how it will behave in most of those scenarios.

Right up until an optimizing compiler throws your assumptions under the bus.

Compilers are allowed to (and both GCC and Clang frequently do) assume that your program will never invoke undefined behavior, and optimize accordingly.

See: http://blog.llvm.org/2011/05/what-every-c-programmer-should-... Also maybe: http://blog.regehr.org/archives/1307

This can lead to some pretty bad security flaws: https://lwn.net/Articles/575563/

There are no comments on this comment yet.