Here is a simple regression for this:
#include "smack.h"
int main(void) {
int x = __VERIFIER_nondet_int();
int *y = &x;
free(y);
return 0;
}
This regression should fail, and yet it passes. This is due to both stack variable allocation (alloc) and malloc being modeled the same way, mainly setting the Alloc array entry to allocated. Stack variable allocation should probably not do that.
Here is a simple regression for this:
This regression should fail, and yet it passes. This is due to both stack variable allocation (
alloc) andmallocbeing modeled the same way, mainly setting theAllocarray entry to allocated. Stack variable allocation should probably not do that.