File tree 4 files changed +14
-10
lines changed
regression/cbmc-primitives
4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1
- FUTURE
1
+ CORE
2
2
main.c
3
3
--no-simplify --no-propagation
4
4
^EXIT=10$
10
10
--
11
11
Check that the dynamic object property is nondet for uninitialized pointers. We
12
12
use --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
2
2
main.c
3
3
4
4
^EXIT=10$
9
9
^warning: ignoring
10
10
--
11
11
Check 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
2
2
main.c
3
3
--no-simplify --no-propagation
4
4
^EXIT=10$
11
11
Check that both positive and negative offsets can be chosen for uninitialized
12
12
pointers. We use --no-simplify and --no-propagation to ensure that the case is
13
13
not 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
2
2
main.c
3
3
4
4
^EXIT=10$
8
8
--
9
9
^warning: ignoring
10
10
--
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