MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / fuse_fuzzer

Function fuse_fuzzer

src/bin/harness.rs:185–205  ·  view source on GitHub ↗
(
    project: String,
    seed_dir: &Option<PathBuf>,
    n_fuzzer: usize,
    use_cons: bool,
)

Source from the content-addressed store, hash-verified

183}
184
185fn fuse_fuzzer(
186 project: String,
187 seed_dir: &Option<PathBuf>,
188 n_fuzzer: usize,
189 use_cons: bool,
190) -> Result<()> {
191 let deopt = Deopt::new(project)?;
192 let test_dir: PathBuf = if let Some(seed_dir) = seed_dir {
193 seed_dir.clone()
194 } else {
195 deopt.get_library_seed_dir()?
196 };
197 let programs = crate::deopt::utils::read_sort_dir(&test_dir)?;
198 let batch_size = programs.len() / n_fuzzer;
199
200 let mut lib_fuzzer = LibFuzzer::new(programs, batch_size, deopt, use_cons);
201 lib_fuzzer.transform()?;
202 lib_fuzzer.synthesis()?;
203 lib_fuzzer.compile()?;
204 Ok(())
205}
206
207fn compile_fuzzer(project: String, kind: Compile, exploit: bool) -> Result<()> {
208 let deopt = Deopt::new(project)?;

Callers 1

mainFunction · 0.85

Calls 5

read_sort_dirFunction · 0.85
get_library_seed_dirMethod · 0.80
transformMethod · 0.80
synthesisMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected