LWN.net Logo

It's not the worst offender

It's not the worst offender

Posted Jul 17, 2009 16:15 UTC (Fri) by khim (subscriber, #9252)
In reply to: Linux 2.6.30 exploit posted by Ajaxelitus
Parent article: Linux 2.6.30 exploit posted

It would have been better for gcc to print a 'test for NULL after use' warning than for it to silently optimize-away the code.

If you think GCC is bad then think again. RVCT will happily optimize away things like "if (!this) { ... }" - because standard gurantees that this is never NULL!


(Log in to post comments)

It's not the worst offender

Posted Jul 17, 2009 22:32 UTC (Fri) by nix (subscriber, #2304) [Link]

A while back Robert Dewar described an extreme example of something similar here (though this involved uninitialized variables instead).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds