================ @@ -2501,7 +2501,14 @@ alpha.core.PointerSub (C) Check for pointer subtractions on two pointers pointing to different memory chunks. According to the C standard §6.5.6 only subtraction of pointers that point into (or one past the end) the same array object is valid (for this -purpose non-array variables are like arrays of size 1). +purpose non-array variables are like arrays of size 1). This checker only +searches for different memory objects at subtraction, but does not check if the +array index is correct ( +:ref:`alpha.security.ArrayBoundsV2 <alpha-security-ArrayBoundsV2>` checks the +index to some extent). ---------------- NagyDonat wrote:
```suggestion reports subtraction between different memory objects and does not check whether the index (or more generally, memory offset) is within bounds. Bounds checking is done by :ref:`alpha.security.ArrayBoundV2 <alpha-security-ArrayBoundV2>`. ``` https://github.com/llvm/llvm-project/pull/102580 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits