[libcxx-commits] [libcxx] [ASan][libc++] std::basic_string annotations (PR #72677)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 22 17:35:18 PST 2023


AdvenamTacet wrote:

Thank you!

> Does this mean that -fsanitize=address will stop working out of the box with a non-asan libc++.dylib? 

Now yes, but adding a macro to opt-in or opt-out is trivial, we already have the `#if` in place, it's enough to add a condition (`&& defined(ANNOTATE_STRING_OR_STH)`).

I'm in favor of opt-out macro, instead of opt-in. I'm aware of problems resulting from this decision, but using sanitized dylib should be the standard anyway and we should push in that direction.

We can always change opt-out to opt-in before branching, if we get feedback suggesting it.
Making it initially opt-out gives us more feedback now and the experience with previous containers shows that it's very important.

Let me know what version you prefer and I will add it.

PS
Ofc, not-annotated binary won't work with annotated libc++.dylib as well.

https://github.com/llvm/llvm-project/pull/72677


More information about the libcxx-commits mailing list