File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
regression/cbmc-primitives Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1- FUTURE
1+ CORE
22main.c
33--no-simplify --no-propagation
44^EXIT=10$
1010--
1111Check that the dynamic object property is nondet for uninitialized pointers. We
1212use --no-simplify and --no-propagation to ensure that the case is not solved by
13- the constant propagation and thus tests the constraint encoding. Recorded as
14- ADA-526.
13+ the constant propagation and thus tests the constraint encoding. We expect
14+ that `__CPROVER_DYNAMIC_OBJECT` should be nondet for pointers that are neither
15+ null nor valid.
Original file line number Diff line number Diff line change 1- FUTURE
1+ CORE
22main.c
33
44^EXIT=10$
99^warning: ignoring
1010--
1111Check that the dynamic object property is nondet for uninitialized pointers.
12- Recorded as ADA-526.
Original file line number Diff line number Diff line change 1- FUTURE
1+ CORE
22main.c
33--no-simplify --no-propagation
44^EXIT=10$
1111Check that both positive and negative offsets can be chosen for uninitialized
1212pointers. We use --no-simplify and --no-propagation to ensure that the case is
1313not solved by the constant propagation and thus tests the constraint encoding.
14- Recorded as ADA-528.
Original file line number Diff line number Diff line change 1- FUTURE
1+ CORE
22main.c
33
44^EXIT=10$
88--
99^warning: ignoring
1010--
11- Check that both positive and negative offsets can be chosen for uninitialized
12- pointers. Recorded as ADA-528.
11+ For uninitialised pointers, CBMC chooses a nondeterministic value (though no memory
12+ is allocated). Since the offset of pointers is signed, negative offsets should be
13+ able to be chosen (along with positive ones) non-deterministically.
14+ `__CPROVER_POINTER_OFFSET` is the CBMC primitive that gets the pointer offset
15+ from the base address of the object. This test guards this, and especially
16+ against the case where we could only observe some cases where offsets were only
17+ positive (in some CI configurations, for instance).
You can’t perform that action at this time.
0 commit comments