File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
regression/contracts-dfcc/memory-predicates-is-fresh-failure-modes Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ __CPROVER_assigns(__CPROVER_object_from(arr))
8
8
{
9
9
__CPROVER_assert (arr != NULL , "arr is not NULL" );
10
10
__CPROVER_assert (size < __CPROVER_max_malloc_size , "size is capped" );
11
- if (size > 0 )
11
+ if (size > 0 && size < __CPROVER_max_malloc_size )
12
12
{
13
13
arr [0 ] = 0 ;
14
14
arr [size - 1 ] = 0 ;
Original file line number Diff line number Diff line change 2
2
main.c
3
3
--dfcc main --enforce-contract foo _ --pointer-check --pointer-primitive-check --pointer-overflow-check
4
4
^\[__CPROVER_contracts_car_set_insert.assertion.\d+\] line \d+ CAR size is less than __CPROVER_max_malloc_size: FAILURE$
5
- ^\[__CPROVER_contracts_write_set_check_assignment.assertion.\d+\] line \d+ ptr NULL or writable up to size: FAILURE$
6
- ^\[__CPROVER_contracts_write_set_check_assignment.assertion.\d+\] line \d+ no offset bits overflow on CAR upper bound computation: FAILURE$
7
5
^\[foo.assertion.\d+\] line \d+ size is capped: FAILURE$
8
- ^\[foo.assigns.\d+\] line \d+ Check that arr\[\(.*\)0\] is assignable: FAILURE$
9
- ^\[foo.assigns.\d+\] line \d+ Check that arr\[\(.*\)\(size - \(.*\)1\)\] is assignable: FAILURE$
10
- ^\[foo.pointer_arithmetic.\d+\] line \d+ pointer arithmetic: pointer outside object bounds in arr \+ \(.*\)\(size - \(.*\)1\): FAILURE$
11
- ^\[foo.pointer_arithmetic.\d+\] line \d+ pointer arithmetic: pointer outside object bounds in arr \+ \(.*\)\(size - \(.*\)1\): FAILURE$
12
- ^\[foo.pointer_dereference.\d+\] line \d+ dereference failure: pointer outside object bounds in arr\[\(.*\)\(size - \(.*\)1\)\]: FAILURE$
6
+ ^\*\* 2 of \d+ failed
13
7
^EXIT=10$
14
8
^SIGNAL=0$
15
9
^VERIFICATION FAILED$
You can’t perform that action at this time.
0 commit comments