[libcxx-commits] [PATCH] D145628: [ASan][libcxx] A way to turn off annotations for containers with a specific allocator

Hans Wennborg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 9 02:43:44 PST 2023


hans added a comment.

Thanks for adding this!

I think for https://crbug.com/1420967 we will need this. Unpoisoning is not an option there (I think?) since other code will access the memory buffer while the vector is still "active".



================
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``.
+
----------------
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?


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