[libcxx-commits] [PATCH] D156155: [NFC][libc++] Update comments to reflect changes in ASan

Tacet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 24 11:33:16 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG705fb08be1eb: [NFC][libc++] Update comments to reflect changes in ASan (authored by AdvenamTacet).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156155

Files:
  libcxx/include/deque
  libcxx/include/vector


Index: libcxx/include/vector
===================================================================
--- libcxx/include/vector
+++ libcxx/include/vector
@@ -840,9 +840,12 @@
     inline void __emplace_back_slow_path(_Args&&... __args);
 
     // The following functions are no-ops outside of AddressSanitizer mode.
-    // We call annotatations only for the default Allocator because other allocators
-    // may not meet the AddressSanitizer alignment constraints.
-    // See the documentation for __sanitizer_annotate_contiguous_container for more details.
+    // We call annotations for every allocator, unless explicitly disabled.
+    //
+    // To disable annotations for a particular allocator, change value of
+    // __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
     _LIBCPP_CONSTEXPR_SINCE_CXX20
     void __annotate_contiguous_container(const void *__beg, const void *__end,
Index: libcxx/include/deque
===================================================================
--- libcxx/include/deque
+++ libcxx/include/deque
@@ -968,7 +968,12 @@
    };
 
 // The following functions are no-ops outside of AddressSanitizer mode.
-// We call annotations only for the default Allocator.
+// We call annotations for every allocator, unless explicitly disabled.
+//
+// To disable annotations for a particular allocator, change value of
+// __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
     // TODO LLVM18: Remove the special-casing
     _LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156155.543656.patch
Type: text/x-patch
Size: 1896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230724/d3b035cc/attachment-0001.bin>


More information about the libcxx-commits mailing list