File tree Expand file tree Collapse file tree 7 files changed +55
-33
lines changed
regression/cbmc-incr-smt2/pointers-conversions Expand file tree Collapse file tree 7 files changed +55
-33
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ int main()
66 uint32_t input ;
77 uint32_t original = input ;
88 uint8_t * ptr = (uint8_t * )(& input );
9- assert (* ptr == 0 ); // falsifiable
9+ assert (* ptr != 42 ); // falsifiable
1010 * ptr = ~(* ptr );
1111 assert (input != original ); // valid
1212}
Original file line number Diff line number Diff line change 1+ CORE
2+ byte_extract.c
3+ --trace
4+ Running incremental SMT2 solving via
5+ Building error trace
6+ \[main\.assertion\.\d+\] line \d+ assertion \*ptr != 42: FAILURE
7+ \[main\.assertion\.\d+\] line \d+ assertion input != original: SUCCESS
8+ input=42ul? \(00000000 00000000 00000000 00101010\)
9+ original=42ul? \(00000000 00000000 00000000 00101010\)
10+ Violated property:
11+ file byte_extract.c function main line \d+ thread \d+
12+ assertion \*ptr != 42
13+ ^EXIT=10$
14+ ^SIGNAL=0$
15+ --
16+ Reached unimplemented Generation of SMT formula for byte extract expression: byte_extract_little_endian
17+ --
18+ This test is here to document our lack of support for byte_extract_little_endian
19+ in the pointers support for the new SMT backend.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdint.h>
3+
4+ int main ()
5+ {
6+ uint32_t x = 0u ;
7+ uint8_t * ptr = (uint8_t * )(& x );
8+ uint32_t offset ;
9+ __CPROVER_assume (offset >= 0u && offset < 4u );
10+ * (ptr + offset ) = 1u ;
11+ assert (x != 256u );
12+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ byte_update.c
3+ --trace
4+ Running incremental SMT2 solving via
5+ Building error trace
6+ \[main\.assertion\.\d+\] line \d+ assertion x != 256u: FAILURE
7+ State \d+ file byte_update\.c function main line \d+ thread \d
8+ offset=1ul? \(00000000 00000000 00000000 00000001\)
9+ Assumption:
10+ file byte_update\.c line \d+ function main
11+ offset >= 0u && offset < 4u
12+ State \d+ file byte_update\.c function main line \d+ thread \d+
13+ byte_extract_little_endian\(x, \(signed long( long)? int\)offset, uint8_t\)=1 \(00000001\)
14+ Violated property:
15+ file byte_update.c function main line \d+ thread \d+
16+ assertion x != 256u
17+ ^EXIT=10$
18+ ^SIGNAL=0$
19+ --
20+ Reached unimplemented Generation of SMT formula for byte extract expression: byte_update_little_endian
21+ --
22+ This test is here to document our lack of support for byte_update_little_endian
23+ in the pointers support for the new SMT backend.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments