LWN.net Logo

GCC and static analysis

GCC and static analysis

Posted May 2, 2012 16:21 UTC (Wed) by mathstuf (subscriber, #69389)
In reply to: GCC and static analysis by npsimons
Parent article: GCC and static analysis

Same here. I don't have static analysis tools enabled in my build trees yet, but all unit tests get coupled with targets to run the following over them:

- valgrind
- callgrind
- helgrind
- cachegrind
- massif
- Also experimental valgrind tools, but I haven't actually used them yet.
- gprof

Fire off the 'valgrind' target, wait a while, come back and inspect memory leaks (mainly in Python from the bindings). Tack that on top of pretty much every warning flag GCC understands, and I am much more sure that the code is safe (though still not correct).


(Log in to post comments)

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