aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch
blob: 6dbdf21bcbdba53df50838e5f51ff8c321f057d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/include/__config b/include/__config
index a067add..2b93653 100644
--- a/include/__config
+++ b/include/__config
@@ -1039,10 +1039,12 @@ typedef __char32_t char32_t;
 #  ifndef _LIBCPP_HAS_NO_ASAN
     extern "C" _LIBCPP_EXPORTED_FROM_ABI void
     __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
+#    if !defined(_LIBCPP_NO_ASAN_CONTIGUOUS_CONTAINER_FEATURES)
 extern "C" _LIBCPP_EXPORTED_FROM_ABI void __sanitizer_annotate_double_ended_contiguous_container(
     const void*, const void*, const void*, const void*, const void*, const void*);
 extern "C" _LIBCPP_EXPORTED_FROM_ABI int
 __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, const void*, const void*);
+#    endif
 #  endif
 
 // Try to find out if RTTI is disabled.
diff --git a/include/deque b/include/deque
index a093349..3f80a17 100644
--- a/include/deque
+++ b/include/deque
@@ -981,7 +981,7 @@ public:
         (void)__old_con_end;
         (void)__new_con_beg;
         (void)__new_con_end;
-#ifndef _LIBCPP_HAS_NO_ASAN
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(_LIBCPP_NO_ASAN_CONTIGUOUS_CONTAINER_FEATURES)
         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);
@@ -1153,7 +1153,7 @@ public:
                 __block_start, __block_end, __block_start, __block_start, __block_start, __block_end);
         }
     }
-#if !defined(_LIBCPP_HAS_NO_ASAN)
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(_LIBCPP_NO_ASAN_CONTIGUOUS_CONTAINER_FEATURES)
 
   public:
     _LIBCPP_HIDE_FROM_ABI
diff --git a/include/vector b/include/vector
index 15297a1..34de662 100644
--- a/include/vector
+++ b/include/vector
@@ -876,7 +876,7 @@ private:
       (void)__end;
       (void)__old_mid;
       (void)__new_mid;
-#ifndef _LIBCPP_HAS_NO_ASAN
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(_LIBCPP_NO_ASAN_CONTIGUOUS_CONTAINER_FEATURES)
       if (!__libcpp_is_constant_evaluated() && __beg != nullptr && __asan_annotate_container_with_allocator<_Allocator>::value)
         __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
 #endif