summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christian Wailes <chriswailes@google.com> 2019-01-24 01:05:02 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-01-24 01:05:02 +0000
commit80c398b74c2ba085b80e04ac1bba9d16f48a8e1e (patch)
tree7d639e99db9df243614f4867629f7ca223a41b25
parent5d33fe94e499733a87dcdc112baaf920ddcbe178 (diff)
parent30f16caf64b6a86fd9e7b9519500aafea57155be (diff)
Merge "Added mitigation for b/122921367"
-rw-r--r--core/jni/com_android_internal_os_Zygote.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 691027dbf83d..827d13f3deb9 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -14,6 +14,15 @@
* limitations under the License.
*/
+/*
+ * Disable optimization of this file if we are compiling with the address
+ * sanitizer. This is a mitigation for b/122921367 and can be removed once the
+ * bug is fixed.
+ */
+#if __has_feature(address_sanitizer)
+#pragma clang optimize off
+#endif
+
#define LOG_TAG "Zygote"
// sys/mount.h has to come before linux/fs.h due to redefinition of MS_RDONLY, MS_BIND, etc