Merge "hal: Enable integer overflow sanitizer" into audio-hal.lnx.6.0

This commit is contained in:
Linux Build Service Account 2019-06-12 09:27:28 -07:00 committed by Gerrit - the friendly Code Review server
commit 5ec023a713
15 changed files with 111 additions and 0 deletions

View File

@ -26,4 +26,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
LOCAL_MODULE:= audiod LOCAL_MODULE:= audiod
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@ -358,6 +358,9 @@ LOCAL_MODULE_OWNER := qti
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
LOCAL_CFLAGS += -Wno-unused-variable LOCAL_CFLAGS += -Wno-unused-variable

View File

@ -50,6 +50,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------- #--------------------------------------------
@ -109,6 +112,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -168,6 +174,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
#include $(BUILD_SHARED_LIBRARY) #include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------- #--------------------------------------------
@ -227,6 +236,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#-------------------------------------------- #--------------------------------------------
@ -282,6 +294,9 @@ LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#==================================================================================================== #====================================================================================================
# --- enable 3rd Party Spkr-prot lib # --- enable 3rd Party Spkr-prot lib
@ -337,6 +352,9 @@ LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -395,6 +413,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -456,6 +477,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -515,6 +539,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -577,6 +604,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -647,6 +677,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -706,6 +739,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
#include $(BUILD_SHARED_LIBRARY) #include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
@ -764,6 +800,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#------------------------------------------- #-------------------------------------------
# Build AUDIOZOOM # Build AUDIOZOOM
@ -821,6 +860,9 @@ endif
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)

View File

@ -18,4 +18,7 @@ LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
LOCAL_STATIC_LIBRARIES += libprofile_rt LOCAL_STATIC_LIBRARIES += libprofile_rt
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@ -54,6 +54,9 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
# --------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------
@ -77,6 +80,9 @@ LOCAL_SHARED_LIBRARIES += libOmxAacEnc
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := test/omx_aac_enc_test.c LOCAL_SRC_FILES := test/omx_aac_enc_test.c
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
endif endif

View File

@ -56,6 +56,9 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
# --------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------
@ -79,6 +82,9 @@ LOCAL_SHARED_LIBRARIES += libOmxAmrEnc
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := test/omx_amr_enc_test.c LOCAL_SRC_FILES := test/omx_amr_enc_test.c
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
endif endif

View File

@ -56,6 +56,9 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
# --------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------
@ -78,6 +81,9 @@ LOCAL_SHARED_LIBRARIES += libOmxEvrcEnc
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := test/omx_evrc_enc_test.c LOCAL_SRC_FILES := test/omx_evrc_enc_test.c
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
endif endif

View File

@ -58,6 +58,9 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
@ -82,6 +85,9 @@ LOCAL_SHARED_LIBRARIES += libOmxG711Enc
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := test/omx_g711_enc_test.c LOCAL_SRC_FILES := test/omx_g711_enc_test.c
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
endif endif

View File

@ -57,6 +57,9 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
@ -81,6 +84,9 @@ LOCAL_SHARED_LIBRARIES += libOmxQcelp13Enc
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := test/omx_qcelp13_enc_test.c LOCAL_SRC_FILES := test/omx_qcelp13_enc_test.c
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
endif endif

View File

@ -95,6 +95,9 @@ ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
@ -136,6 +139,9 @@ endif
LOCAL_MODULE:= libhwacceffectswrapper LOCAL_MODULE:= libhwacceffectswrapper
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow
endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
endif endif
@ -205,6 +211,9 @@ ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
endif endif
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
endif endif
@ -238,6 +247,9 @@ LOCAL_C_INCLUDES := \
LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
endif endif

View File

@ -30,6 +30,9 @@ LOCAL_COPY_HEADERS += inc/qahw_effect_api.h
LOCAL_PRELINK_MODULE := false LOCAL_PRELINK_MODULE := false
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)

View File

@ -42,6 +42,9 @@ LOCAL_COPY_HEADERS += inc/qahw_effect_visualizer.h
LOCAL_PRELINK_MODULE := false LOCAL_PRELINK_MODULE := false
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
#test app compilation #test app compilation

View File

@ -31,6 +31,9 @@ LOCAL_32_BIT_ONLY := true
LOCAL_C_INCLUDES += $(hal-play-inc) LOCAL_C_INCLUDES += $(hal-play-inc)
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
# audio_hal_multi_record_test # audio_hal_multi_record_test
@ -51,4 +54,7 @@ hal-rec-inc = $(TARGET_OUT_HEADERS)/mm-audio/qahw_api/inc
LOCAL_C_INCLUDES += $(hal-rec-inc) LOCAL_C_INCLUDES += $(hal-rec-inc)
LOCAL_VENDOR_MODULE := true LOCAL_VENDOR_MODULE := true
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@ -64,5 +64,8 @@ LOCAL_CFLAGS += -Wno-tautological-compare
LOCAL_CFLAGS += -Wno-unused-function LOCAL_CFLAGS += -Wno-unused-function
LOCAL_CFLAGS += -Wno-unused-local-typedef LOCAL_CFLAGS += -Wno-unused-local-typedef
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
endif endif

View File

@ -50,5 +50,8 @@ LOCAL_CFLAGS += -Wno-tautological-compare
LOCAL_CFLAGS += -Wno-unused-function LOCAL_CFLAGS += -Wno-unused-function
LOCAL_CFLAGS += -Wno-unused-local-typedef LOCAL_CFLAGS += -Wno-unused-local-typedef
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_SANITIZE := integer_overflow
endif
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
endif endif