From 4c740a04e0b3f0fd6f8195a39a75f87e45e7f212 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Tue, 10 Dec 2024 16:48:54 -0800 Subject: [PATCH] Allow disabling the legacy coverage using FUZZTEST_NO_LEGACY_COVERAGE. PiperOrigin-RevId: 704892418 --- fuzztest/internal/coverage.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fuzztest/internal/coverage.cc b/fuzztest/internal/coverage.cc index a63b1468..25a6623f 100644 --- a/fuzztest/internal/coverage.cc +++ b/fuzztest/internal/coverage.cc @@ -330,7 +330,8 @@ bool CorpusCoverage::Update(ExecutionCoverage* execution_coverage) { } // namespace fuzztest::internal -#if !defined(FUZZTEST_COMPATIBILITY_MODE) && !defined(FUZZTEST_USE_CENTIPEDE) +#if !defined(FUZZTEST_COMPATIBILITY_MODE) && \ + !defined(FUZZTEST_USE_CENTIPEDE) && !defined(FUZZTEST_NO_LEGACY_COVERAGE) // Sanitizer Coverage hooks. // The instrumentation runtime calls back the following function at startup, @@ -511,4 +512,5 @@ void __sanitizer_weak_hook_strncasecmp(void *caller_pc, const char *s1, } #endif // !defined(FUZZTEST_COMPATIBILITY_MODE) && - // !defined(FUZZTEST_USE_CENTIPEDE) + // !defined(FUZZTEST_USE_CENTIPEDE) && + // !defined(FUZZTEST_NO_LEGACY_COVERAGE)