@@ -10955,15 +10955,17 @@ If the ``inbounds`` keyword is present, the result value of a
10955
10955
:ref:`poison value <poisonvalues>` if one of the following rules is violated:
10956
10956
10957
10957
* The base pointer has an *in bounds* address of an allocated object, which
10958
- means that it points into an allocated object, or to its end.
10958
+ means that it points into an allocated object, or to its end. Note that the
10959
+ object does not have to be live anymore; being in-bounds of a deallocated
10960
+ object is sufficient.
10959
10961
* If the type of an index is larger than the pointer index type, the
10960
10962
truncation to the pointer index type preserves the signed value.
10961
10963
* The multiplication of an index by the type size does not wrap the pointer
10962
10964
index type in a signed sense (``nsw``).
10963
- * The successive addition of offsets (without adding the base address) does
10965
+ * The successive addition of each offset (without adding the base address) does
10964
10966
not wrap the pointer index type in a signed sense (``nsw``).
10965
10967
* The successive addition of the current address, interpreted as an unsigned
10966
- number, and an offset, interpreted as a signed number, does not wrap the
10968
+ number, and each offset, interpreted as a signed number, does not wrap the
10967
10969
unsigned address space and remains *in bounds* of the allocated object.
10968
10970
As a corollary, if the added offset is non-negative, the addition does not
10969
10971
wrap in an unsigned sense (``nuw``).
0 commit comments