It would be helpful to poison unused capacity in AK::Vector upon growing and/or shrinking the capacity, or when moving from inline capacity to out of line capacity.
libstdc++ does this for std::vector, here:
With internal macros _GLIBCXX_ASAN_ANNOTATE_GROW, _GLIBCXX_ASAN_ANNOTATE_GREW, _GLIBCXX_ASAN_ANNOTATE_SHRINK and _GLIBCXX_ASAN_ANNOTATE_REINIT.
libstdc++ instruments every insert, emplace, erase, and resize event.
The actual instrumentation is here, it seems they have a helper struct to manage ASAN annotations.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too