Skip to content

Commit

Permalink
Fix clang linking without --libafl arg (#608)
Browse files Browse the repository at this point in the history
* Fix clang linking without --libafl arg

* clippy
  • Loading branch information
andreafioraldi authored Apr 12, 2022
1 parent e8f5949 commit a99d0b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libafl/src/stages/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
5 changes: 4 additions & 1 deletion libafl_cc/src/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit a99d0b2

Please sign in to comment.