Skip to content

Commit 1810a3d

Browse files
committed
Fixed bug related main function without return
Signed-off-by: Herbert Rocha <herberthb12@gmail.com>
1 parent d1095b9 commit 1810a3d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

map2check

0 Bytes
Binary file not shown.

map2check-wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
exit(1)
6767

6868
if is_memsafety:
69-
command_line += " --generate-witness "
69+
command_line += " --assume-malloc-true --generate-witness "
7070
elif is_reachability:
7171
command_line += " --target-function __VERIFIER_error --generate-witness "
7272
elif is_overflow:

sample/over.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1+
extern void __VERIFIER_error(void);
2+
extern int __VERIFIER_nondet_int(void);
3+
14
main()
25
{
36
int a = __VERIFIER_nondet_int();
7+
__VERIFIER_assume(a>0);
48
int b = __VERIFIER_nondet_int();
9+
__VERIFIER_assume(b>0);
510

611
if(a)
712
{
813
int c = a +b;
914
}else{
1015
int c = b;
11-
}
16+
}
1217

1318
}

0 commit comments

Comments
 (0)