Skip to content

Commit 6bdbed4

Browse files
committed
Update cramtest about __goblint_check not affecting memLeak
1 parent b8d4d0e commit 6bdbed4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// PARAM: --set ana.activated[+] memLeak --set ana.malloc.unique_address_count 1
2+
#include <stdlib.h>
23
#include <goblint.h>
34

45
int main() {
56
int *ptr = malloc(sizeof(int));
6-
__goblint_check(ptr); // UNKNOWN
7+
__goblint_check(ptr == 0); // FAIL
78
free(ptr);
89
}

tests/regression/76-memleak/32-no-mem-leak-goblint-check.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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

0 commit comments

Comments
 (0)