Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6bc12e0 authored by Zach Riggle's avatar Zach Riggle Committed by android-build-merger
Browse files

Merge "Enhance coverage options to include those needed by Honggfuzz for...

Merge "Enhance coverage options to include those needed by Honggfuzz for coverage-driven fuzzing" am: 0d2a7551 am: 98025a15
am: 1e9943c3

Change-Id: Iddfb99235b737f440107b51c1eb78d1a429b562a
parents 8a2d7611 1e9943c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -175,7 +175,7 @@ ifneq ($(filter coverage,$(my_sanitize)),)
  ifeq ($(filter address,$(my_sanitize)),)
  ifeq ($(filter address,$(my_sanitize)),)
    $(error $(LOCAL_PATH): $(LOCAL_MODULE): Use of 'coverage' also requires 'address')
    $(error $(LOCAL_PATH): $(LOCAL_MODULE): Use of 'coverage' also requires 'address')
  endif
  endif
  my_cflags += -fsanitize-coverage=trace-pc-guard
  my_cflags += -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp
  my_sanitize := $(filter-out coverage,$(my_sanitize))
  my_sanitize := $(filter-out coverage,$(my_sanitize))
endif
endif


+1 −1
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ ifdef LOCAL_SDK_VERSION
    $(error $(LOCAL_PATH): $(LOCAL_MODULE): NDK fuzz tests are not supported.)
    $(error $(LOCAL_PATH): $(LOCAL_MODULE): NDK fuzz tests are not supported.)
endif
endif


LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard
LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp
LOCAL_STATIC_LIBRARIES += libFuzzer
LOCAL_STATIC_LIBRARIES += libFuzzer


ifdef LOCAL_MODULE_PATH
ifdef LOCAL_MODULE_PATH
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@
################################################
################################################
$(call record-module-type,HOST_FUZZ_TEST)
$(call record-module-type,HOST_FUZZ_TEST)


LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard
LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp
LOCAL_STATIC_LIBRARIES += libLLVMFuzzer
LOCAL_STATIC_LIBRARIES += libLLVMFuzzer


include $(BUILD_HOST_EXECUTABLE)
include $(BUILD_HOST_EXECUTABLE)