Skip to content

Commit f482614

Browse files
committed
rabbit mode
1 parent ddedadc commit f482614

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

libafl_libfuzzer/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ introspection = []
3535
## `-fsanitize=fuzzer-no-link -l:libafl_libfuzzer_runtime.a`
3636
embed-runtime = []
3737

38+
## 🐇
39+
rabbit = []
40+
3841
[dependencies]
3942
libfuzzer-sys = { version = "0.4.7", default-features = false }
4043
document-features = { version = "0.2" }

libafl_libfuzzer/build.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ use std::{
55
process::{Command, Stdio},
66
};
77

8+
#[cfg(feature = "rabbit")]
9+
const NAMESPACE: &str = "🐇";
10+
#[cfg(not(feature = "rabbit"))]
11+
const NAMESPACE: &str = "__libafl";
12+
const NAMESPACE_LEN: usize = NAMESPACE.as_bytes().len();
13+
814
fn main() {
915
if cfg!(any(feature = "cargo-clippy", docsrs)) {
1016
return; // skip when clippy or docs is running
@@ -116,9 +122,6 @@ fn main() {
116122

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

119-
const NAMESPACE: &str = "🐇";
120-
const NAMESPACE_LEN: usize = NAMESPACE.as_bytes().len();
121-
122125
let replacement = format!("_ZN{NAMESPACE_LEN}{NAMESPACE}");
123126

124127
// redefine all the rust-mangled symbols we can

0 commit comments

Comments
 (0)