This feature is primarily meant for Android. It makes ASan both easier to use and much faster:
- No need to do setprop for each started application. Instead, a one-time, device-wide setup step is required.
- Works with -userdebug builds of Android, not just -eng builds.
- VM is not reloaded from scratch for each ASan process. Instead, zygote is run with ASan runtime (but no instrumented code) in "deactivated" mode, and the first loaded instrumented library "activates" it.
This change adds ASAN_OPTIONS=start_deactivated=1 flag. When present, ASan will start in "deactivated" mode, with no heap poisoning, no quarantine, no stack trace gathering, and minimal redzones. All this features come back when __asan_init is called for the constructor of an instrumented library.
The feature itself is not Android-specific, and this patch includes a Linux test for it.
It is not compatible with flexible shadow mapping.
doesn't it have to be in __asan namespace?