[GWP-ASan] Disable for apps.

Disable GWP-ASan for all applications by default. Long-term
R-release goals are that GWP-ASan is:
 1. Enabled by default for the system.
 2. Enabled by default for system apps.
 3. Disabled by default (with manifest opt-in) for user apps.

At DP2 cut point, we were enabled by default for the system, system
apps, and user apps. We were intending to downgrade user apps to be
disabled-by-default with the manifest changes in ag/10329607, but we
didn't manage to get that through by DP2 cut.

Because we want GWP-ASan to be less aggressive on user apps, it's safest
to just disable GWP-ASan for all apps.

Bug: 135634846
Test: Build and verify no GWP-ASan for apps.
Change-Id: If92cafb49b1484d173a4eadb377d18b29d217cd4
This commit is contained in:
Mitch Phillips
2020-02-26 09:53:34 -08:00
parent 214fe98184
commit 9300488ba6

View File

@@ -626,12 +626,6 @@ static void PreApplicationInit() {
// Set the jemalloc decay time to 1.
mallopt(M_DECAY_TIME, 1);
// Maybe initialize GWP-ASan here. Must be called after
// mallopt(M_SET_ZYGOTE_CHILD).
bool ForceEnableGwpAsan = false;
android_mallopt(M_INITIALIZE_GWP_ASAN, &ForceEnableGwpAsan,
sizeof(ForceEnableGwpAsan));
}
static void SetUpSeccompFilter(uid_t uid, bool is_child_zygote) {