File tree Expand file tree Collapse file tree 13 files changed +22
-17
lines changed
Function_Pointer_Init_One_Candidate
Function_Pointer_Init_Two_Candidates
src/ansi-c/goto-conversion Expand file tree Collapse file tree 13 files changed +22
-17
lines changed Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
-
3
+ --no-pointer-check
4
4
^EXIT=10$
5
5
^SIGNAL=0$
6
6
\[f2.assertion.1\] line [0-9]+ assertion 0: SUCCESS
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --function foo
3
+ --function foo --no-pointer-check
4
4
^\[foo.assertion.\d+\] line \d+ assertion other_function\(4\) == 5: FAILURE$
5
5
^\[foo.assertion.\d+\] line \d+ assertion other_function\(4\) == 4: SUCCESS$
6
6
^EXIT=10$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --function foo
3
+ --function foo --no-pointer-check
4
4
^\[foo.assertion.\d+\] line \d+ assertion other_function\(4\) == 5: FAILURE$
5
5
^\[foo.assertion.\d+\] line \d+ assertion other_function\(4\) >= 4: SUCCESS$
6
6
^EXIT=10$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
-
3
+ --no-pointer-check
4
4
^VERIFICATION FAILED$
5
5
^\[main.assertion\.1\] line 16.*SUCCESS$
6
6
^\[main.assertion\.2\] line 17.*FAILURE$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
-
3
+ --no-pointer-check
4
4
^VERIFICATION FAILED$
5
5
^\[main.assertion\.1\] line 9.*SUCCESS$
6
6
^\[main.assertion\.2\] line 10.*FAILURE$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
-
3
+ --no-pointer-check
4
4
^VERIFICATION FAILED$
5
5
^\[main.assertion\.1\] line 10.*SUCCESS$
6
6
^\[main.assertion\.2\] line 11.*FAILURE$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
-
3
+ --no-pointer-check
4
4
^VERIFICATION FAILED$
5
5
^\[main.assertion\.1\] line 11.*SUCCESS$
6
6
^\[main.assertion\.2\] line 12.*FAILURE$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
-
3
+ --no-pointer-check
4
4
^VERIFICATION FAILED$
5
5
^\[main.assertion\.1\] line 10.*SUCCESS$
6
6
^\[main.assertion\.2\] line 11.*FAILURE$
Original file line number Diff line number Diff line change 6
6
^\[main\.pointer_dereference\.2\] .* dereference failure: invalid integer address in \*p: SUCCESS$
7
7
^\[main\.assertion\.1\] .* assertion \*p==42: SUCCESS$
8
8
^\[main\.pointer_dereference\.[0-9]+\] .* dereference failure: invalid integer address in p\[.*1\]: FAILURE$
9
- ^\[main\.assertion\.2\] .* assertion \*\(p\+1\)==42: SUCCESS $
9
+ ^\[main\.assertion\.2\] .* assertion \*\(p\+1\)==42: UNKNOWN $
10
10
^VERIFICATION FAILED$
11
11
--
12
12
^warning: ignoring
Original file line number Diff line number Diff line change
1
+ int nondet_int ();
2
+
1
3
int main ()
2
4
{
5
+ int i = nondet_int ();
6
+
7
+ if (i == 0 )
3
8
{
4
9
int * p = 0x0 ;
5
10
6
11
// Since local_bitvector_analysis can tell that p is NULL, this should
7
12
// generate only a NULL check, and not any of the other pointer checks.
8
13
* p = 1 ;
9
14
}
10
-
15
+ else if ( i == 1 )
11
16
{
12
17
int i ;
13
18
int * q = & i ;
14
19
15
20
// This should only generate a not-dead check and a bounds-check.
16
21
* q = 2 ;
17
22
}
18
-
23
+ else if ( i == 2 )
19
24
{
20
25
int * r = __CPROVER_allocate (sizeof (int ), 1 );
21
26
22
27
// This should generate a not-deallocated check and a bounds-check.
23
28
* r = 5 ;
24
29
}
25
-
30
+ else if ( i == 3 )
26
31
{
27
32
int * s ;
28
33
Original file line number Diff line number Diff line change 1
1
CORE gcc-only
2
2
main.c
3
-
3
+ --no-pointer-check
4
4
^\[main.assertion.1\] line .* assertion \(\(char \*\)NULL\) != \(char \*\)\(void \*\)0 \+ (\(.*\))?1: SUCCESS$
5
5
^\[main.assertion.2\] line .* assertion \(\(char \*\)NULL\) != \(char \*\)\(void \*\)0 - (\(.*\))?1: SUCCESS$
6
6
^\[main.assertion.3\] line .* assertion \(\(char \*\)NULL\) != \(char \*\)\(void \*\)0 \+ \(.*\)offset: SUCCESS$
Original file line number Diff line number Diff line change 8
8
^\[main\.pointer_dereference\.1\] line 36 dereference failure: dead object in \*p: SUCCESS$
9
9
^\[main\.pointer_dereference\.2\] line 36 dereference failure: pointer outside object bounds in \*p: SUCCESS$
10
10
^\[main\.assertion\.3\] line 42 assertion \*p == 42: FAILURE$
11
- ^\[main\.pointer_dereference\.5\] line 42 dereference failure: pointer outside object bounds in \*p: SUCCESS $
11
+ ^\[main\.pointer_dereference\.5\] line 42 dereference failure: pointer outside object bounds in \*p: UNKNOWN $
12
12
^\[main\.pointer_dereference\.3\] line 42 dereference failure: pointer NULL in \*p: SUCCESS$
13
13
^\[main\.pointer_dereference\.4\] line 42 dereference failure: dead object in \*p: FAILURE$
14
14
^\[main\.assertion\.4\] line 49 assertion e == 42: FAILURE$
Original file line number Diff line number Diff line change @@ -1368,7 +1368,7 @@ void goto_check_ct::pointer_rel_check(
1368
1368
c.assertion ,
1369
1369
" pointer relation: " + c.description ,
1370
1370
" pointer arithmetic" ,
1371
- false , // fatal
1371
+ true , // fatal
1372
1372
expr.find_source_location (),
1373
1373
pointer,
1374
1374
guard);
@@ -1427,7 +1427,7 @@ void goto_check_ct::pointer_overflow_check(
1427
1427
c.assertion ,
1428
1428
" pointer arithmetic: " + c.description ,
1429
1429
" pointer arithmetic" ,
1430
- false , // fatal
1430
+ true , // fatal
1431
1431
expr.find_source_location (),
1432
1432
expr,
1433
1433
guard);
@@ -1469,7 +1469,7 @@ void goto_check_ct::pointer_validity_check(
1469
1469
c.assertion ,
1470
1470
" dereference failure: " + c.description ,
1471
1471
" pointer dereference" ,
1472
- false , // fatal
1472
+ true , // fatal
1473
1473
src_expr.find_source_location (),
1474
1474
src_expr,
1475
1475
guard);
You can’t perform that action at this time.
0 commit comments