[libcxx-commits] [PATCH] D136765: [ASan][libcxx] Annotating std::vector with all allocators

Hans Wennborg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 16 04:03:10 PDT 2023


hans added a comment.

In D136765#4198690 <https://reviews.llvm.org/D136765#4198690>, @AdvenamTacet wrote:

>> I think https://crbug.com/1420967 is also a good example of where unpoisoning isn't an option.
>
> If access to poisoned memory happens only in a few functions, it's possible to just turn off instrumentation in them with `__attribute__((__no_sanitize__("address")))`.
> But if the buffer is modified, it may be better to turn off annotations for that allocator. Therefore I made D145628 <https://reviews.llvm.org/D145628>.

Thanks, I think turning off annotations for this allocator is the best option. Hunting down all functions that access the memory would be hard, and also disabling instrumentation in them seems like a too big hammer.

>> The current patch still has the `_LIBCPP_CLANG_VER` issue though.
>
> Here I agree with @philnik that waiting until LLVM17 (//given that LLVM16 isn't released yet//) makes no sense and testing changes would be very difficult. Also, rGdd1b7b797a116eed588fd752fbe61d34deeb24e4 <https://reviews.llvm.org/rGdd1b7b797a116eed588fd752fbe61d34deeb24e4> was accepted more than 4 moths ago, so it's a big time gap between support in //compiler-rt// and //libc++//.
> I also don't see any other reasonable way to check support in //compiler-rt// than checking version number.

There would be no need to wait since 17 is already the current version at HEAD.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136765



More information about the libcxx-commits mailing list