[libcxx-commits] [PATCH] D146815: [ASan][libc++] Annotating std::deque with all allocators

Tacet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 7 20:04:14 PDT 2023


AdvenamTacet updated this revision to Diff 529489.
AdvenamTacet added a comment.

rebase


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146815

Files:
  libcxx/include/deque


Index: libcxx/include/deque
===================================================================
--- libcxx/include/deque
+++ libcxx/include/deque
@@ -457,9 +457,6 @@
 template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
 class _LIBCPP_TEMPLATE_VIS deque
 {
-private:
-  using __default_allocator_type = allocator<_Tp>;
-
 public:
     // types:
 
@@ -980,7 +977,7 @@
         const void* __old_con_end,
         const void* __new_con_beg,
         const void* __new_con_end) const {
-        if (__beg && is_same<allocator_type, __default_allocator_type>::value)
+        if (__beg != nullptr && __asan_annotate_container_with_allocator<_Allocator>::value)
             __sanitizer_annotate_double_ended_contiguous_container(
                 __beg, __end, __old_con_beg, __old_con_end, __new_con_beg, __new_con_end);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146815.529489.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230608/e1427ba3/attachment.bin>


More information about the libcxx-commits mailing list