summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-01-18 01:51:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-01-18 01:51:42 +0000
commitf6c9f3a9159864bf48fa65043986aa83886fdcf2 (patch)
tree34a3e19daaf8554ac96699aef92c74101effe9b9
parenta327db1eaa895bcce76b88174f9c2c69e52c9169 (diff)
parenteac7f4e15a0617b52aefd3414c019291ea029c9f (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 a8e142784397..9e449a20a6f0 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