Skip to content

Instantly share code, notes, and snippets.

@martintrojer
Created January 29, 2012 10:22
Show Gist options
  • Save martintrojer/1698165 to your computer and use it in GitHub Desktop.
Save martintrojer/1698165 to your computer and use it in GitHub Desktop.
symbolic execution
int* func(int x; int y) {
int* p=0;
int s=x*y;
if (s!=0)
p=malloc(s);
else if(y==0)
p=malloc(x);
return p;
}
//func as defined above
int* func(int x; int y);
//main calls func
int main() {
int x,y;
int p*;
...
ASSERT(x!=0);
p=func(x,y);
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment