Reputation: 145
I have been looking for static analysis tools that detect buffer overrun in c++/c shared and static libraries, but without success. Especially with c/c++ libraries that are integrated with programs that are written in different programming language?
Do you have any suggestions?
Thank you
Upvotes: 1
Views: 742
Reputation: 95410
Not for C++, but for C, and uses dynamic not static analysis: our CheckPointer program detects all kinds of memory access errors, including many that Valgrind will not. Unlike a static analyzer, if CheckPointer reports an error, you really have an error.
One problem you will face with testing a shared library, or a program that calls "foreign code", is the need to characterize the properties of the entry points and called APIs. [You would have to do this regardless if the tool was static or dynamic, because the correctness of the program under test depends on the gaurantees it is provided at entry and the gaurantees that the foreign APIs provide it].
Upvotes: 1