diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-10-17 00:47:20 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-10-20 07:00:43 +0000 |
commit | 7e88bb5e5372fc3454735e6ac840390341bf3d20 (patch) | |
tree | 2972097aa9acdf0e1e414ded2ca8b6a00372213a /CMakeOptions.txt | |
parent | eda196951b9b8293bb32cf6b3610ae4d1d5b940e (diff) |
fuzzshark: integrate oss-fuzz targets in CMake
The current fuzzshark target built by CMake is not usable for fuzzing.
Address this by adding a new ENABLE_FUZZER option that enables mandatory
instrumentation and libFuzzer linking options for the fuzzshark binary.
Create more CMake targets for specific fuzzing targets such as
fuzzshark_ip and fuzzshark_ip_proto-udp. These targets are not built by
default, either build individual targets or use the all-fuzzers target.
Now these binaries are not specific to oss-fuzz, so move them to a new
directory (perhaps the corpora can be added here in the future).
oss-fuzz build.sh is simplified and reuses the CMake targets.
When OSS_FUZZ is set, it will force static linking with external
libraries and limit parallel linker jobs (maybe not necessary for
Google's oss-fuzz builders, but my 8G/6c VM ran out of memory).
Change-Id: If3ba8f60ea1f5c3bd2131223050a81f9acbce05d
Reviewed-on: https://code.wireshark.org/review/30228
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'CMakeOptions.txt')
-rw-r--r-- | CMakeOptions.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeOptions.txt b/CMakeOptions.txt index c267c00884..2cfe6419d4 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -45,6 +45,7 @@ option(ENABLE_CODE_ANALYSIS "Enable the compiler's static analyzer if possible" option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF) option(ENABLE_TSAN "Enable ThreadSanitizer (TSan) for debugging" OFF) option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF) +option(ENABLE_FUZZER "Enable libFuzzer instrumentation for use with fuzzshark" OFF) option(ENABLE_CHECKHF_CONFLICT "Enable hf conflict check for debugging (start-up may be slower)" OFF) option(ENABLE_CCACHE "Speed up compiling and linking using ccache if possible" OFF) |