Fix clang linking without --libafl arg (#608)

* Fix clang linking without --libafl arg

* clippy
This commit is contained in:
Andrea Fioraldi 2022-04-12 20:34:38 +02:00 committed by GitHub
parent e8f5949aec
commit a99d0b2967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -140,7 +140,7 @@ where
}
max_time = Some(max_time.map_or(time, |t: SystemTime| t.max(time)));
let input = (self.load_callback)(fuzzer, state, &path)?;
drop(fuzzer.evaluate_input(state, executor, manager, input)?);
fuzzer.evaluate_input(state, executor, manager, input)?;
}
} else if attr.is_dir() {
let dir_max_time =

View File

@ -174,7 +174,10 @@ impl CompilerWrapper for ClangWrapper {
new_args.push(args[i].as_ref().to_string());
i += 1;
}
if linking && suppress_linking >= 0 && suppress_linking < 1337 {
if linking
&& (suppress_linking > 0 || (self.has_libafl_arg && suppress_linking == 0))
&& suppress_linking < 1337
{
linking = false;
new_args.push(
PathBuf::from(env!("OUT_DIR"))