From 8c58c2293739d3d090c721827e4217c113ced89f Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Fri, 7 Sep 2018 15:47:59 +0000 Subject: [PATCH] [asan] Update a vector's storage annotation during destruction. Reviewed as https://reviews.llvm.org/D50101. Thanks to bobsayshilol (Ben) for the patch. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341671 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/vector | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/vector b/include/vector index 0f5006f37..9245ba18c 100644 --- a/include/vector +++ b/include/vector @@ -540,13 +540,14 @@ public: value_type, typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0); -#if _LIBCPP_DEBUG_LEVEL >= 2 _LIBCPP_INLINE_VISIBILITY ~vector() { + __annotate_delete(); +#if _LIBCPP_DEBUG_LEVEL >= 2 __get_db()->__erase_c(this); - } #endif + } vector(const vector& __x); vector(const vector& __x, const allocator_type& __a);