[libcxx-commits] [PATCH] D145628: [ASan][libcxx] A way to turn off annotations for containers with a specific allocator
Tacet via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 16 01:47:08 PDT 2023
AdvenamTacet added inline comments.
================
Comment at: libcxx/docs/UsingLibcxx.rst:527
+If ``__asan_annotate_container_with_allocator<_Alloc>::value == false``, container won't be poisoned at all.
+Value may be changed by template specialization. Variable ``value`` is of type ``bool``.
+
----------------
hans wrote:
> Could you please include a code example which shows how to do the specialization?
>
> Also, will it be possible to write this in a way that works both with libc++ versions that have and don't have this change?
I added examples. I hope those are helpful. If you believe that another example is necessary as well, let me know.
> Also, will it be possible to write this in a way that works both with libc++ versions that have and don't have this change?
Possibly a macro would be answer to that, I suggested one in an update comment. But it should be possible to solve easily with libc++ version number as well. I don't really like the idea of creating a macro here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145628/new/
https://reviews.llvm.org/D145628
More information about the libcxx-commits
mailing list