Skip to content

Commit

Permalink
Fixed bug related main function without return
Browse files Browse the repository at this point in the history
Signed-off-by: Herbert Rocha <[email protected]>
  • Loading branch information
hbgit committed Oct 25, 2017
1 parent d1095b9 commit 1810a3d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Binary file modified map2check
Binary file not shown.
2 changes: 1 addition & 1 deletion map2check-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
exit(1)

if is_memsafety:
command_line += " --generate-witness "
command_line += " --assume-malloc-true --generate-witness "
elif is_reachability:
command_line += " --target-function __VERIFIER_error --generate-witness "
elif is_overflow:
Expand Down
7 changes: 6 additions & 1 deletion sample/over.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
extern void __VERIFIER_error(void);
extern int __VERIFIER_nondet_int(void);

main()
{
int a = __VERIFIER_nondet_int();
__VERIFIER_assume(a>0);
int b = __VERIFIER_nondet_int();
__VERIFIER_assume(b>0);

if(a)
{
int c = a +b;
}else{
int c = b;
}
}

}

0 comments on commit 1810a3d

Please sign in to comment.