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

Do not pass -C passes=... when nightly is used and plugins are compiled #449

Merged
merged 6 commits into from
Jan 16, 2024
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
12 changes: 6 additions & 6 deletions cargo-afl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,12 @@ where
let binding = common::afl_llvm_dir();
let p = binding.display();

let mut rustflags = format!(
let mut rustflags = String::from(
"-C debug-assertions \
-C overflow_checks \
-C passes={passes} \
-C codegen-units=1 \
-C opt-level=3 \
-C target-cpu=native "
-C target-cpu=native ",
);
let mut environment_variables = HashMap::<&str, String>::new();
environment_variables.insert("ASAN_OPTIONS", asan_options);
Expand All @@ -271,13 +270,14 @@ where

environment_variables.insert("AFL_QUIET", "1".to_string());
} else {
rustflags.push_str(
"-C llvm-args=-sanitizer-coverage-level=3 \
rustflags.push_str(&format!(
smoelius marked this conversation as resolved.
Show resolved Hide resolved
"-C passes={passes} \
-C llvm-args=-sanitizer-coverage-level=3 \
smoelius marked this conversation as resolved.
Show resolved Hide resolved
-C llvm-args=-sanitizer-coverage-trace-pc-guard \
-C llvm-args=-sanitizer-coverage-prune-blocks=0 \
-C llvm-args=-sanitizer-coverage-trace-compares
",
);
));
}

let no_cfg_fuzzing = env::var("AFL_NO_CFG_FUZZING").is_ok();
Expand Down