[PATCH] D54469: Introduce new `disable_init` ASan option that is only supported on platforms where `SANITIZER_SUPPORTS_DISABLED_INIT` is true. Currently this is only supported on Darwin.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 12:40:10 PST 2018


delcypher added a comment.

In https://reviews.llvm.org/D54469#1298804, @eugenis wrote:

> Is this needed for the clients of that out-of-process allocator inspection thing?


Yes, this is exactly what this patch is for.

> Could it be a separate library that links asan allocator in out-of-process mode, but not the rest? Otherwise you are adding a mode of execution to ASan when there is no shadow mapping, and now that's something that everyone else have to keep in mind.

This is something we have planned as a later patch (once all of the enumeration pieces have landed). However we **also want to support `dlopen()` of the full ASan shared library** for various deployment scenarios that we are concerned with.
I was hoping to make this patch as non-intrusive as possible so that other platforms need not worry about the special mode that only exists on Darwin. With the patch as it stands right now other platforms just need to make sure they don't add stuff before
`if (SANITIZER_SUPPORTS_INIT_FOR_DLOPEN && UNLIKELY(InitIsViaDlopen())) {... }` . Is that asking too much of other platform maintainers? If yes, how would suggest we modify this patch to make it easier for other platforms to ignore the existence of this Darwin only feature?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D54469





More information about the llvm-commits mailing list