Skip to content

Commit

Permalink
configure: define macro for fuzzing builds
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
morehouse authored and rustyrussell committed Sep 18, 2023
1 parent 1b81376 commit 6334797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6334797

Please sign in to comment.