[libc-commits] [libc] [libc] Add front() and erase() to FixedVector (PR #213866)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Wed Aug 5 01:12:35 PDT 2026
================
----------------
kaladron wrote:
This contains UB when the array is full. Because end() is one past the last element, when the item is full, this points to uninitialised memory. The dereference happens before the address-of, and this will trigger UBSan checks.
I think:
```suggestion
return reverse_iterator{store.data() + item_count};
```
Should work here (but I haven't tested it locally)
https://github.com/llvm/llvm-project/pull/213866
More information about the libc-commits
mailing list