[libcxx-commits] [libcxx] [libc++][hardening] Check bounds on arithmetic in __bounded_iter (PR #78876)

Will Hawkins via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 20 22:20:01 PST 2024


================
@@ -51,8 +58,8 @@ struct __bounded_iter {
 
   // Create a singular iterator.
   //
-  // Such an iterator does not point to any object and is conceptually out of bounds, so it is
-  // not dereferenceable. Observing operations like comparison and assignment are valid.
+  // Such an iterator point past the end of an empty span, so it is not dereferenceable.
----------------
hawkinsw wrote:

```suggestion
  // Such an iterator points past the end of an empty span, so it is not dereferenceable.
```

https://github.com/llvm/llvm-project/pull/78876


More information about the libcxx-commits mailing list