Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase fuzzing memory limit #342

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,24 @@ bench-ci baseline target=default-target features="":
bench target=default-target features="":
cargo bench --profile={{ if target == "debug" { "dev" } else { target } }} {{ if features =="" {''} else { "--features " + features } }} -- --verbose

#####################################
# FUZZING
#####################################

# Enough memory (4GB) for the fuzzer to run for 5 hours, with address sanitizer turned on
fuzz_memory_limit := "4096"

# Fuzzes the given target
fuzz fuzz-target:
cargo +nightly fuzz run {{ fuzz-target }} --release
cargo +nightly fuzz run {{ fuzz-target }} --release -- -rss_limit_mb={{ fuzz_memory_limit }}

# Fuzzes the given target. Stops after `max_time` seconds
fuzz-timed fuzz-target max_time:
cargo +nightly fuzz run {{ fuzz-target }} --release -- -max_total_time={{ max_time }}
cargo +nightly fuzz run {{ fuzz-target }} --release -- -rss_limit_mb={{ fuzz_memory_limit }} -max_total_time={{ max_time }}

# Builds fuzzers for submission to external fuzzing services
build-fuzzers: (build-fuzzer "fuzz_guest_call") (build-fuzzer "fuzz_host_call") (build-fuzzer "fuzz_host_print")

# Builds the given fuzzer
build-fuzzer fuzz-target:
cargo +nightly fuzz build {{ fuzz-target }} --release -s none
cargo +nightly fuzz build {{ fuzz-target }} --release
Loading