LWN.net Logo

On the importance of return codes

On the importance of return codes

Posted Dec 3, 2009 10:27 UTC (Thu) by epa (subscriber, #39769)
In reply to: On the importance of return codes by hppnq
Parent article: On the importance of return codes

It seems only a relatively recent change to unsetenv() introduced a non-void return value, and that the loader code was not updated at the same time.
I wonder whether linting the whole source tree with some kind of static analyser to warn about ignored return values would have caught this.


(Log in to post comments)

On the importance of return codes

Posted Dec 3, 2009 13:12 UTC (Thu) by NAR (subscriber, #1313) [Link]

I guess some static analyser could have warned about this. But I also guess that that warning would have been buried deep under heaps of false alarms. The Linux kernel NULL-pointer vulnerabilities were detected by the Stanford checker (if I remember correctly), it's just nobody cared to wade through all that stuff.

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