Wireshark-commits: [Wireshark-commits] master 7e88bb5: fuzzshark: integrate oss-fuzz targets in CMa

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 20 Oct 2018 07:00:50 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7e88bb5e5372fc3454735e6ac840390341bf3d20
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

7e88bb5 by Peter Wu (peter@xxxxxxxxxxxxx):

    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@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  eda1969   ieee80211: automatically determine MIC length for OWE
     add  7e88bb5   fuzzshark: integrate oss-fuzz targets in CMake


Summary of changes:
 CMakeLists.txt                                     |  61 +++++++--
 CMakeOptions.txt                                   |   1 +
 fuzz/CMakeLists.txt                                | 142 +++++++++++++++++++++
 {tools/oss-fuzzshark => fuzz}/FuzzerInterface.h    |   0
 .../StandaloneFuzzTargetMain.c                     |   0
 {tools/oss-fuzzshark => fuzz}/fuzzshark.c          |   0
 tools/oss-fuzzshark/build.sh                       |  66 ++--------
 7 files changed, 198 insertions(+), 72 deletions(-)
 create mode 100644 fuzz/CMakeLists.txt
 rename {tools/oss-fuzzshark => fuzz}/FuzzerInterface.h (100%)
 rename {tools/oss-fuzzshark => fuzz}/StandaloneFuzzTargetMain.c (100%)
 rename {tools/oss-fuzzshark => fuzz}/fuzzshark.c (100%)