llvm-project/compiler-rt/test/sanitizer_common/ios_commands
Dan Liew 8bffb63497 Introduce a way to allow the ASan dylib on Darwin platforms to be loaded via `dlopen()`.
Summary:

The purpose of this option is provide a way for the ASan dylib
to be loaded via `dlopen()` without triggering most initialization
steps (e.g. shadow memory set up) that normally occur when the
ASan dylib is loaded.

This new functionality is exposed by

- A `SANITIZER_SUPPORTS_INIT_FOR_DLOPEN` macro which indicates if the
  feature is supported. This only true for Darwin currently.
- A `HandleDlopenInit()` function which should return true if the library
  is being loaded via `dlopen()` and
  `SANITIZER_SUPPORTS_INIT_FOR_DLOPEN` is supported. Platforms that
  support this may perform any initialization they wish inside this
  function.

Although disabling initialization is something that could potentially
apply to other sanitizers it appears to be unnecessary for other
sanitizers so this patch only makes the change for ASan.

rdar://problem/45284065

Reviewers: kubamracek, george.karpenkov, kcc, eugenis, krytarowski

Subscribers: #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D54469

llvm-svn: 348078
2018-12-01 15:45:42 +00:00
..
iossim_compile.py [asan] Add a compilation wrapper that codesigns shared libraries to support iOS simulator testing 2017-04-28 04:55:35 +00:00
iossim_env.py
iossim_prepare.py [sanitizer] Unify and generalize Apple platforms in CMake and lit test configs 2018-06-20 13:33:42 +00:00
iossim_run.py Introduce a way to allow the ASan dylib on Darwin platforms to be loaded via `dlopen()`. 2018-12-01 15:45:42 +00:00