source: CIVL/examples/memleak/heapleak.c

main
Last change on this file was 61c7ca6, checked in by Stephen Siegel <siegel@…>, 3 years ago

Adding new test which reveals problem with heap reachability analysis for heap canonicalization.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5744 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 244 bytes
Line 
1#include <stdlib.h>
2#include <assert.h>
3#include <stdio.h>
4struct S {
5 struct S * fld;
6};
7int main() {
8 struct S *p = malloc(sizeof(struct S));
9 p->fld = p;
10 p = NULL;
11 // memory leak should be reported now
12 while (1) { printf("hi"); }
13}
Note: See TracBrowser for help on using the repository browser.