File tree 4 files changed +8
-2
lines changed
regression/cbmc/Memory_leak_abort
4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ int main() {
10
10
exit (1 );
11
11
if (* p == 2 )
12
12
_Exit (1 );
13
+ if (* p == 3 )
14
+ __VERIFIER_error ();
13
15
free (p );
14
16
return 0 ;
15
17
}
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --memory-leak-check
3
+ --memory-leak-check --no-assertions
4
4
^EXIT=10$
5
5
^SIGNAL=0$
6
6
^VERIFICATION FAILED$
7
7
_Exit\.memory-leak\.1.*FAILURE
8
8
__CPROVER__start\.memory-leak\.1.*SUCCESS
9
9
abort\.memory-leak\.1.*FAILURE
10
10
exit\.memory-leak\.1.*FAILURE
11
+ main\.memory-leak\.1.*FAILURE
11
12
--
13
+ main\.assertion\.1.*FAILURE
12
14
^warning: ignoring
Original file line number Diff line number Diff line change @@ -1708,7 +1708,8 @@ void goto_checkt::goto_check(
1708
1708
if (
1709
1709
enable_memory_leak_check && simplified_guard.is_false () &&
1710
1710
(i.function == " abort" || i.function == " exit" ||
1711
- i.function == " _Exit" ))
1711
+ i.function == " _Exit" ||
1712
+ (i.labels .size () == 1 && i.labels .front () == " __VERIFIER_abort" )))
1712
1713
{
1713
1714
memory_leak_check (i.function );
1714
1715
}
Original file line number Diff line number Diff line change @@ -711,6 +711,7 @@ void goto_convertt::do_function_call_symbol(
711
711
// are being checked
712
712
goto_programt::targett a=dest.add_instruction (ASSUME);
713
713
a->guard =false_exprt ();
714
+ a->labels .push_back (" __VERIFIER_abort" );
714
715
a->source_location =function.source_location ();
715
716
a->source_location .set (" user-provided" , true );
716
717
}
You can’t perform that action at this time.
0 commit comments