Static analysis with assert()
The next release of Goanna determines facts about your program from assertions. We can use this information to determine the bounds of variables and the nullity of pointers.

Goanna’s interval analysis can now catch this division by zero:
#include <assert.h>
int bad_div_of_8(int x)
{
assert(x == 4);
x -= 3;
x--;
return 8 / x;
}
This entry was posted on Tuesday, October 13th, 2009 at 11:32 am and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
