diff options
author | Dante Russo <drusso@codeaurora.org> | 2021-03-11 17:38:31 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-09-03 08:56:10 -0700 |
commit | 83c75e07a27c96632ca2be15f5c4bcb9a0893f41 (patch) | |
tree | 89176c6e5b9fc7b8884a49339e10589115e4f01e | |
parent | c9560c1201d115ff372c74fed296e660139e7a76 (diff) |
Fixes ubsan shift-out-of-bounds SIGABRT
There are now global sanitizers that will
be applied to all modules, so we no longer
need to decalre local sanitizer options.
One of the local sanitizer options caused a
ubsan shift-out-of-bounds SIGABRT in several
location modules in code that does not appear
to have anything problematic with it.
CRs-fixed: 2898374
Change-Id: Icb7e3b2cf35be7c0a945eff16cea2b3a4f30e4a8
-rw-r--r-- | Android.bp | 12 | ||||
-rw-r--r-- | Android.mk | 5 | ||||
-rw-r--r-- | android/1.0/Android.mk | 4 | ||||
-rw-r--r-- | android/1.1/Android.mk | 4 | ||||
-rw-r--r-- | android/2.0/Android.mk | 4 | ||||
-rw-r--r-- | android/2.1/Android.mk | 3 | ||||
-rw-r--r-- | android/utils/Android.bp | 2 | ||||
-rw-r--r-- | batching/Android.bp | 2 | ||||
-rw-r--r-- | core/Android.bp | 2 | ||||
-rw-r--r-- | geofence/Android.bp | 2 | ||||
-rw-r--r-- | gnss/Android.bp | 2 | ||||
-rw-r--r-- | location/Android.bp | 2 | ||||
-rw-r--r-- | utils/Android.bp | 2 |
13 files changed, 15 insertions, 31 deletions
@@ -16,18 +16,6 @@ GNSS_CFLAGS = [ "-Wno-error=date-time", ] -/* Activate the following for regression testing */ -GNSS_SANITIZE = { -/* address: true,*/ - cfi: true, - misc_undefined: [ - "bounds", - "null", - "unreachable", - "integer", - ], -} - /* Activate the following for debug purposes only, comment out for production */ GNSS_SANITIZE_DIAG = { @@ -36,9 +36,6 @@ endif LOCAL_PATH := $(call my-dir) include $(call all-makefiles-under,$(LOCAL_PATH)) -GNSS_SANITIZE := cfi bounds null unreachable integer -# Activate the following two lines for regression testing -#GNSS_SANITIZE += address -#GNSS_SANITIZE_DIAG := $(GNSS_SANITIZE) +GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) diff --git a/android/1.0/Android.mk b/android/1.0/Android.mk index 797ecce..f63a948 100644 --- a/android/1.0/Android.mk +++ b/android/1.0/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@1.0-impl-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VENDOR_MODULE := true @@ -58,7 +58,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@1.0-service-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@1.0-service-qti.xml diff --git a/android/1.1/Android.mk b/android/1.1/Android.mk index 66abd06..edf8547 100644 --- a/android/1.1/Android.mk +++ b/android/1.1/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@1.1-impl-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VENDOR_MODULE := true @@ -59,7 +59,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@1.1-service-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@1.1-service-qti.xml diff --git a/android/2.0/Android.mk b/android/2.0/Android.mk index c0b91ae..e3422f9 100644 --- a/android/2.0/Android.mk +++ b/android/2.0/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@2.0-impl-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VENDOR_MODULE := true @@ -71,7 +71,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@2.0-service-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@2.0-service-qti.xml diff --git a/android/2.1/Android.mk b/android/2.1/Android.mk index a947e41..4be97a9 100644 --- a/android/2.1/Android.mk +++ b/android/2.1/Android.mk @@ -2,7 +2,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@2.1-impl-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VENDOR_MODULE := true @@ -74,7 +73,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.gnss@2.1-service-qti -LOCAL_SANITIZE += $(GNSS_SANITIZE) + # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@2.1-service-qti.xml diff --git a/android/utils/Android.bp b/android/utils/Android.bp index c3dc17a..20fea88 100644 --- a/android/utils/Android.bp +++ b/android/utils/Android.bp @@ -3,7 +3,7 @@ cc_library_static { name: "liblocbatterylistener", vendor: true, - sanitize: GNSS_SANITIZE, + cflags: GNSS_CFLAGS + ["-DBATTERY_LISTENER_ENABLED"], local_include_dirs: ["."], diff --git a/batching/Android.bp b/batching/Android.bp index 9182a0a..ce794d1 100644 --- a/batching/Android.bp +++ b/batching/Android.bp @@ -4,7 +4,7 @@ cc_library_shared { name: "libbatching", vendor: true, - sanitize: GNSS_SANITIZE, + shared_libs: [ "libutils", diff --git a/core/Android.bp b/core/Android.bp index ee8e807..fe9f067 100644 --- a/core/Android.bp +++ b/core/Android.bp @@ -4,7 +4,7 @@ cc_library_shared { name: "libloc_core", vendor: true, - sanitize: GNSS_SANITIZE, + shared_libs: [ "liblog", diff --git a/geofence/Android.bp b/geofence/Android.bp index 4801eb8..bf8474f 100644 --- a/geofence/Android.bp +++ b/geofence/Android.bp @@ -5,7 +5,7 @@ cc_library_shared { name: "libgeofencing", vendor: true, - sanitize: GNSS_SANITIZE, + srcs: [ "GeofenceAdapter.cpp", diff --git a/gnss/Android.bp b/gnss/Android.bp index a3e8de9..736ea81 100644 --- a/gnss/Android.bp +++ b/gnss/Android.bp @@ -5,7 +5,7 @@ cc_library_shared { name: "libgnss", vendor: true, - sanitize: GNSS_SANITIZE, + shared_libs: [ "libutils", diff --git a/location/Android.bp b/location/Android.bp index 8532a08..fb4af2d 100644 --- a/location/Android.bp +++ b/location/Android.bp @@ -4,7 +4,7 @@ cc_library_shared { name: "liblocation_api", vendor: true, - sanitize: GNSS_SANITIZE, + shared_libs: [ "libutils", diff --git a/utils/Android.bp b/utils/Android.bp index 7d43d57..33d8440 100644 --- a/utils/Android.bp +++ b/utils/Android.bp @@ -4,7 +4,7 @@ cc_library_shared { name: "libgps.utils", vendor: true, - sanitize: GNSS_SANITIZE, + //# Libs shared_libs: [ |