File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
tests/regression/76-memleak Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11// PARAM: --set ana.activated[+] memLeak --set ana.malloc.unique_address_count 1
2+ #include <stdlib.h>
23#include <goblint.h>
34
45int main () {
56 int * ptr = malloc (sizeof (int ));
6- __goblint_check (ptr ); // UNKNOWN
7+ __goblint_check (ptr == 0 ); // FAIL
78 free (ptr );
89}
Original file line number Diff line number Diff line change 11 $ goblint -- set ana. activated[+ ] memLeak -- set ana. malloc. unique_address_count 1 32 -no-mem-leak-goblint-check. c
2- [Warning ][Assert] Assertion " (int )ptr" is unknown . (32 -no-mem-leak-goblint-check. c: 6 : 5 -6 : 25 )
2+ [Error ][Assert] Assertion " (unsigned long )ptr == (unsigned long )((int *)0) " will fail . (32 -no-mem-leak-goblint-check. c: 7 : 5 -7 : 30 )
33 [Info][Deadcode] Logical lines of code (LLoC) summary:
44 live: 5
55 dead: 0
You can’t perform that action at this time.
0 commit comments