You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit changes the type of __CPROVER_POINTER_OFFSET from ssize_t to
size_t. To match, relational operators on pointers are now unsigned, to
enable p+PTRDIFF_MAX+1 > p.
The rationale is subtle. The ISO C 11 standard 6.5.8 par 5 suggests that a
pair of pointers can be compared if either the pointers point into the
object, or one beyond the end of the sequence. The behavior in the case of
a pointer that points before the sequence is undefined. There is a similar
narrative for pointer arithmetic. A pointer with an offset that has a set
most significant bit should thus compare "less than" a pointer with an
offset that has a zero MSB. This suggests an unsigned encoding.
Copy file name to clipboardExpand all lines: regression/cbmc/memory_allocation2/test.desc
+3-3
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ main.c
3
3
--bounds-check
4
4
^EXIT=10$
5
5
^SIGNAL=0$
6
-
^\[main\.array_bounds\.[1-5]\] .*: SUCCESS$
7
-
^\[main\.array_bounds\.[67]\] line 38 array.buffer (dynamic object )?upper bound in buffers\[\(signed long (long )?int\)0\]->buffer\[\(signed long (long )?int\)100\]: FAILURE$
8
-
^\*\* 1 of 6 failed
6
+
^\[main\.array_bounds\.[1-2]\] .*: SUCCESS$
7
+
^\[main\.array_bounds\.3\] line 38 array.buffer (dynamic object )?upper bound in buffers\[\(signed long (long )?int\)0\]->buffer\[\(signed long (long )?int\)100\]: FAILURE$
0 commit comments