From 63347979913bd2608724ec4897cc10800e2aceda Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Mon, 21 Aug 2023 14:50:21 -0500 Subject: [PATCH] configure: define macro for fuzzing builds Sometimes we want to disable certain functionality or otherwise modify code for fuzzing. The FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION macro is a standard way to accomplish this. See https://llvm.org/docs/LibFuzzer.html#fuzzer-friendly-build-mode. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 696e4867d..433451d65 100755 --- a/configure +++ b/configure @@ -174,7 +174,7 @@ set_defaults() fi fi if [ "$FUZZING" != 0 ]; then - FUZZFLAGS="-fsanitize=fuzzer-no-link" + FUZZFLAGS="-fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" CSANFLAGS="$CSANFLAGS $FUZZFLAGS" fi echo CSANFLAGS = $CSANFLAGS