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

Method compile_lib_fuzzers

src/execution/mod.rs:716–735  ·  view source on GitHub ↗
(
        &self,
        fuzzer_dir: &Path,
        fuzzer_binary: &Path,
        kind: Compile,
    )

Source from the content-addressed store, hash-verified

714 }
715
716 pub fn compile_lib_fuzzers(
717 &self,
718 fuzzer_dir: &Path,
719 fuzzer_binary: &Path,
720 kind: Compile,
721 ) -> Result<()> {
722 let mut drivers = Vec::new();
723 for entry in std::fs::read_dir(fuzzer_dir)? {
724 let path = entry?.path();
725 if path.is_file()
726 && path.extension().is_some()
727 && path.extension().unwrap().to_string_lossy() == "cc"
728 {
729 drivers.push(path);
730 }
731 }
732 // compile all the fuzzers into one binary.
733 let programs: Vec<&Path> = drivers.iter().map(|x| x.as_path()).collect();
734 self.compile(programs, fuzzer_binary, kind)
735 }
736
737 pub fn spawn_libfuzzer(&self, fuzzer_binary: &Path, corpus: &Path) -> Result<Child> {
738 let fuzzer_dir = crate::deopt::utils::get_file_dirname(fuzzer_binary);

Callers 4

compileMethod · 0.80
compile_fuzzerFunction · 0.80

Calls 2

pushMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected