commit | ef9986013bdfdd499071710e8079e842a831b45c | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Tue Aug 04 18:01:28 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Aug 04 18:01:28 2020 +0000 |
tree | 6a4061c9eacacc48173a47b2f5bf63fa9343093f | |
parent | cab38503bdac6b65611410bf6a082bc481dd47f1 [diff] | |
parent | 7591bb5ee187f6eac38ad310efe05066f79b0c1d [diff] |
Merge "SCUDO fill options only when USE_SCUDO" am: 7591bb5ee1 Original change: https://android-review.googlesource.com/c/platform/bionic/+/1381396 Change-Id: Ibce8c19142441b8931c9cf779ed11fdd2af1dfb0
diff --git a/libc/Android.bp b/libc/Android.bp index c94b37c..6340340 100644 --- a/libc/Android.bp +++ b/libc/Android.bp
@@ -100,6 +100,9 @@ malloc_pattern_fill_contents: { cflags: ["-DSCUDO_PATTERN_FILL_CONTENTS"], }, + malloc_not_svelte: { + cflags: ["-DUSE_SCUDO"], + }, }, }
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp index f1350d5..01b6a42 100644 --- a/libc/bionic/libc_init_common.cpp +++ b/libc/bionic/libc_init_common.cpp
@@ -86,11 +86,14 @@ } static void __libc_init_malloc_fill_contents() { +// TODO(b/158870657) make this unconditional when all devices support SCUDO. +#if defined(USE_SCUDO) #if defined(SCUDO_PATTERN_FILL_CONTENTS) scudo_malloc_set_pattern_fill_contents(1); #elif defined(SCUDO_ZERO_CONTENTS) scudo_malloc_set_zero_contents(1); #endif +#endif } __BIONIC_WEAK_FOR_NATIVE_BRIDGE