[libcxx-commits] [libcxx] [libc++] Fix vector sanitization annotations on destruction (PR #121031)

Dominic Chen via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 10 13:31:38 PST 2025


ddcc wrote:

I'm not too familiar with the libcxx testing infrastructure, and I'm not sure what the best way to test this would be. Part of the problem is that the two codepaths being changed call `__annotate_delete()` immediately after the `clear()`, so by the time control flow returns to the caller, the intermediate asan container state has been lost and we can't assert on it. The other factor is that the two sanity checks in the compiler-rt asan runtime for the asan shadow state are currently disabled: https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/asan/asan_poisoning.cpp#L448 (lines 448, 455), and I'm hesitant to touch that because it would have broader scope and may unintentionally break other things.

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


More information about the libcxx-commits mailing list