# Fuzz targets: one per DomiStream parser. Its own workspace, built only for fuzzing, never released. # # Linux, nightly, cargo-fuzz: # cargo fuzz run -- -max_total_time=600 # # Windows, stable MSVC, no cargo-fuzz, no sanitizer (same setup as Via's via-core/fuzz): build.rs + win_sections.c # give SanitizerCoverage's counters their section bounds, so the targets link without a sanitizer runtime. # cd fuzz # RUSTFLAGS="-Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 # -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-trace-compares # -Cllvm-args=-simplifycfg-branch-fold-threshold=0 -Ccodegen-units=1 --cfg fuzzing -Cdebug-assertions # -Clink-arg=/include:main" \ # cargo build --release --target x86_64-pc-windows-msvc --bin # target/x86_64-pc-windows-msvc/release/.exe -max_total_time=600 corpus/ # corpus/ and artifacts/ stay out of git. Never set CARGO_TARGET_DIR. [package] name = "domistream-fuzz" version = "0.0.0" edition = "2024" publish = false license = "CPAL-1.0" [package.metadata] cargo-fuzz = true [build-dependencies] cc = "1" [dependencies] libfuzzer-sys = "0.4" domistream = { path = "../crates/domistream" } # Its own workspace, so the fuzz build never joins the main one (cargo fuzz's layout). [workspace] members = ["."] [[bin]] name = "xml" path = "fuzz_targets/xml.rs" test = false doc = false bench = false [[bin]] name = "server_info" path = "fuzz_targets/server_info.rs" test = false doc = false bench = false [[bin]] name = "app_list" path = "fuzz_targets/app_list.rs" test = false doc = false bench = false [[bin]] name = "launch_response" path = "fuzz_targets/launch_response.rs" test = false doc = false bench = false [[bin]] name = "pair_response" path = "fuzz_targets/pair_response.rs" test = false doc = false bench = false [[bin]] name = "server_cert_pem" path = "fuzz_targets/server_cert_pem.rs" test = false doc = false bench = false [[bin]] name = "rtsp_response" path = "fuzz_targets/rtsp_response.rs" test = false doc = false bench = false [[bin]] name = "rtsp_request" path = "fuzz_targets/rtsp_request.rs" test = false doc = false bench = false [[bin]] name = "sdp" path = "fuzz_targets/sdp.rs" test = false doc = false bench = false [[bin]] name = "rtsp_framer" path = "fuzz_targets/rtsp_framer.rs" test = false doc = false bench = false [[bin]] name = "enet_datagram" path = "fuzz_targets/enet_datagram.rs" test = false doc = false bench = false [[bin]] name = "control_frame" path = "fuzz_targets/control_frame.rs" test = false doc = false bench = false [[bin]] name = "control_message" path = "fuzz_targets/control_message.rs" test = false doc = false bench = false [[bin]] name = "input" path = "fuzz_targets/input.rs" test = false doc = false bench = false [[bin]] name = "rtp_header" path = "fuzz_targets/rtp_header.rs" test = false doc = false bench = false [[bin]] name = "video_packet" path = "fuzz_targets/video_packet.rs" test = false doc = false bench = false [[bin]] name = "audio_packet" path = "fuzz_targets/audio_packet.rs" test = false doc = false bench = false