[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
Mon Mar 27 13:56:40 PDT 2023
AdvenamTacet added inline comments.
================
Comment at: libcxx/docs/UsingLibcxx.rst:564-566
+If you know in which functions poisoned memory is accessed, you can
+`turn off instrumentation inside a function with attribute <https://clang.llvm.org/docs/AddressSanitizer.html#disabling-instrumentation-with-attribute-no-sanitize-address>`
+``__attribute__((no_sanitize("address")))``. Notice that those functions should not modify the container.
----------------
philnik wrote:
> From what I can tell `[[clang::no_sanitize("address")]]` is quite fiddly, so I wouldn't recommend it here.
I think it's a nice option, but I am also strongly biased. And that's true that turning off instrumentation may be really tricky.
I removed it, but if someone thinks it would be good to describe every option, I think it may be rediscussed. I'm fine with it and without it.
> ```
> What else can I do?
> -------------------
> If you know in which functions poisoned memory is accessed, you can
> `turn off instrumentation inside a function with attribute <https://clang.llvm.org/docs/AddressSanitizer.html#disabling-instrumentation-with-attribute-no-sanitize-address>`
> ``__attribute__((no_sanitize("address")))``. Notice that those functions should not modify the container.
> ```
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