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

Tacet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 30 22:19:43 PDT 2023


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

This update resolves merge conflicts with new head.


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.526902.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230531/c26f2d1a/attachment.bin>


More information about the libcxx-commits mailing list