From 2ffd65e1d12940b5e13ea743bb88e94a57e7ca97 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Wed, 26 Jul 2017 14:17:09 -0700 Subject: [PATCH] init: only use signed-integer-overflow sanitizer We've blown up twice in init due to the unsigned integer overflow sanitizer despite the overflows in question being both defined and intentional. Test: boot Change-Id: I08effe3202ac1367d858982ff5478b3a088bab37 --- init/Android.bp | 2 +- init/Android.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init/Android.bp b/init/Android.bp index 82945981e..aaef7e933 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -18,7 +18,7 @@ cc_defaults { name: "init_defaults", cpp_std: "experimental", sanitize: { - misc_undefined: ["integer"], + misc_undefined: ["signed-integer-overflow"], }, cppflags: [ "-DLOG_UEVENTS=0", diff --git a/init/Android.mk b/init/Android.mk index ad17f7991..f30c2a451 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -99,5 +99,5 @@ LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \ ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \ ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd -LOCAL_SANITIZE := integer +LOCAL_SANITIZE := signed-integer-overflow include $(BUILD_EXECUTABLE)