From 1871062b289596fae7116dbdda1b8012c1c896ba Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Sat, 17 Nov 2018 20:18:08 -0800 Subject: [PATCH] Disable implicit-integer-sign-change by default. * New clang compiler makes some integer santizers enabling implicit-integer-sign-change, but Android code does not boot with this new sanitizer yet. Bug: 119329758 Test: build and boot with new clang compiler Change-Id: Ic80cde49d3ef51277fbe2a0aa8c1b8f2f8bfd80c --- core/config_sanitizers.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index fcf527e1af..fca5cc279a 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -414,3 +414,14 @@ ifneq ($(my_sanitize_diag),) endif endif endif + +# http://b/119329758, Android core does not boot up with this sanitizer yet. +# Previously sanitized modules might not pass new implicit-integer-sign-change check. +# Disable this check unless it has been explicitly specified. +ifneq ($(findstring fsanitize,$(my_cflags)),) + ifneq ($(findstring integer,$(my_cflags)),) + ifeq ($(findstring sanitize=implicit-integer-sign-change,$(my_cflags)),) + my_cflags += -fno-sanitize=implicit-integer-sign-change + endif + endif +endif