aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch
blob: 290678ca7006f2343a369f0f340a4739cc3da228 (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
diff --git a/include/__config b/include/__config
index 6e3b0e3..c0af95d 100644
--- a/include/__config
+++ b/include/__config
@@ -1062,7 +1062,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 #  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 _LIBCPP_CLANG_VER >= 1600
+#    if _LIBCPP_CLANG_VER >= 1600 && !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
diff --git a/include/deque b/include/deque
index 951bab9..d4ffc7f 100644
--- a/include/deque
+++ b/include/deque
@@ -968,7 +968,7 @@ public:
 // __asan_annotate_container_with_allocator to false.
 // For more details, see the "Using libc++" documentation page or
 // the documentation for __sanitizer_annotate_contiguous_container.
-#if !defined(_LIBCPP_HAS_NO_ASAN) && _LIBCPP_CLANG_VER >= 1600
+#if !defined(_LIBCPP_HAS_NO_ASAN) && _LIBCPP_CLANG_VER >= 1600 && !defined(_LIBCPP_NO_ASAN_CONTIGUOUS_CONTAINER_FEATURES)
     // TODO LLVM18: Remove the special-casing
     _LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(
         const void* __beg,
diff --git a/include/vector b/include/vector
index 659b035..3153e89 100644
--- a/include/vector
+++ b/include/vector
@@ -861,7 +861,7 @@ private:
     // __asan_annotate_container_with_allocator to false.
     // For more details, see the "Using libc++" documentation page or
     // the documentation for __sanitizer_annotate_contiguous_container.
-#ifndef _LIBCPP_HAS_NO_ASAN
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(_LIBCPP_NO_ASAN_CONTIGUOUS_CONTAINER_FEATURES)
     _LIBCPP_CONSTEXPR_SINCE_CXX20
     void __annotate_contiguous_container(const void *__beg, const void *__end,
                                          const void *__old_mid,