This revision fixes unpoisoning in std::vector.
A call to __annotate_delete() in operator() (in __destroy_vector class) is moved after a call to clear(), because clear may poison memory (as container overflow - fc).
It also adds unpoisoning memory before passing it to the deallocator in __vdeallocate() and __copy_assign_alloc(const vector& __c, true_type).
It guarantees that __alloc_traits::deallocate may access returned memory.
Change is motivated by false positives after committing D136765 (currently reverted):
- https://bugs.chromium.org/p/chromium/issues/detail?id=1410719#c6)
- https://github.com/llvm/llvm-project/issues/60384 (minimal failing example)
Standard deallocator does not access the memory, so it does not produce an error, but a fix is necessary to turn on support for non-standard allocators.
Additionally, with that change, revision D136765 should not cause false positives, as returned memory will always be unpoisoned.