File tree Expand file tree Collapse file tree 3 files changed +60
-1
lines changed
Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Original file line number Diff line number Diff line change 1- KNOWNBUG
1+ CORE
22union_list2.c
33
44^EXIT=0$
Original file line number Diff line number Diff line change 1+ struct fatptr
2+ {
3+ int * data ;
4+ unsigned long int len ;
5+ };
6+
7+ struct slice
8+ {
9+ int * data ;
10+ unsigned long int len ;
11+ };
12+
13+ union repr {
14+ struct slice rust ;
15+ struct fatptr raw ;
16+ };
17+
18+ struct slice cast (int * data , unsigned long int len )
19+ {
20+ struct fatptr x ;
21+ union repr z ;
22+ x .data = data ;
23+ x .len = len ;
24+ z .raw = x ;
25+ return z .rust ;
26+ }
27+
28+ struct fatptr cast2 (int * data , unsigned long int len )
29+ {
30+ struct slice w ;
31+ union repr z ;
32+ w .data = data ;
33+ w .len = len ;
34+ z .rust = w ;
35+ return z .raw ;
36+ }
37+
38+ int main ()
39+ {
40+ int x = 256 ;
41+
42+ struct slice z = cast (& x , 1 );
43+ struct fatptr z2 = cast2 (& x , 1 );
44+
45+ __CPROVER_assert (* z .data == 256 , "test 1" );
46+ __CPROVER_assert (* z2 .data == 256 , "test 2" );
47+ }
Original file line number Diff line number Diff line change 1+ KNOWNBUG
2+ main.c
3+
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ ^VERIFICATION SUCCESSFUL$
7+ --
8+ ^warning: ignoring
9+ --
10+ Value sets do not properly track pointers through byte-extract operations. Thus
11+ derferencing yields __CPROVER_memory, which results in a spurious verification
12+ failure.
You can’t perform that action at this time.
0 commit comments