Skip to content

Commit

Permalink
make fuzzer entries more noticeable :)
Browse files Browse the repository at this point in the history
  • Loading branch information
addisoncrump committed Sep 28, 2023
1 parent 36a901b commit f775788
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libafl_libfuzzer/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ fn main() {

let mut redefinitions_file = BufWriter::new(File::create(&redefined_symbols).unwrap());

const NAMESPACE: &str = "🐇";
const NAMESPACE_LEN: usize = NAMESPACE.as_bytes().len();

let replacement = format!("_ZN{NAMESPACE_LEN}{NAMESPACE}");

// redefine all the rust-mangled symbols we can
// TODO this will break when v0 mangling is stabilised
for line in BufReader::new(child.stdout.take().unwrap()).lines() {
Expand All @@ -126,7 +131,7 @@ fn main() {
redefinitions_file,
"{} {}",
symbol,
symbol.replacen("_ZN", "_ZN26__libafl_libfuzzer_runtime", 1)
symbol.replacen("_ZN", &replacement, 1)
)
.unwrap();
}
Expand Down

0 comments on commit f775788

Please sign in to comment.