[libcxx-commits] [PATCH] D144155: [ASan] Unpoisoning vectors memory before deallocation

Tacet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 17 08:48:26 PST 2023


AdvenamTacet added a comment.

Sure, I can add it there.

I created a new revision, because I considered it a separate issue, which should be fixed regardless of the support for more allocators.

Right now, `__annotate_delete()` in `__destroy_vector` class makes no sense (it unpoisons whole memory, and just after that, `clear()` poisons part of it), but the purpose of `__annotate_delete();` is to unpoison memory before deallocation.
Missing `__annotate_delete()` in `__vdeallocate()` and `__copy_assign_alloc(const vector& __c, true_type)` makes all existing calls to `__annotate_delete()` pointless, as with todays implementation of default deallocator, everything should work without calling `__annotate_delete()` at all.

But I will add it in D136765 <https://reviews.llvm.org/D136765> and I will add there a simple test with allocator which cleans the memory during allocation and deallocation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144155/new/

https://reviews.llvm.org/D144155



More information about the libcxx-commits mailing list