[libcxx-commits] [libcxx] [ASan][libc++] Annotating `std::basic_string` with all allocators (PR #75845)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 20 14:01:11 PST 2023
================
@@ -1891,8 +1891,7 @@ private:
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
const void* __begin = data();
const void* __end = data() + capacity() + 1;
- if (!__libcpp_is_constant_evaluated() && __begin != nullptr &&
- is_same<allocator_type, __default_allocator_type>::value)
+ if (!__libcpp_is_constant_evaluated() && __asan_annotate_container_with_allocator<allocator_type>::value)
----------------
EricWF wrote:
OK, I think you've convinced me that it won't blow up, but it'll still offer really weird behavior. As long as the ASAN API can tolerate being passed incorrect values for `old_mid`, then we're groovy.
https://github.com/llvm/llvm-project/pull/75845
More information about the libcxx-commits
mailing list