(fuzzer_path: &Path, driver_id: u16)
| 518 | } |
| 519 | |
| 520 | fn mask_driver_from_fuzzer(fuzzer_path: &Path, driver_id: u16) -> Result<()> { |
| 521 | let mut content = std::fs::read_to_string(fuzzer_path)?; |
| 522 | let crashed_branch = format!("return LLVMFuzzerTestOneInput_{driver_id}("); |
| 523 | if let Some(idx) = content.find(&crashed_branch) { |
| 524 | content.insert_str(idx, "//"); |
| 525 | std::fs::write(fuzzer_path, &content)?; |
| 526 | return Ok(()); |
| 527 | } |
| 528 | eyre::bail!("Unable to find the crashed branch: {crashed_branch}\n") |
| 529 | } |
| 530 | |
| 531 | // save the fuzzer and triger input that enables to reproduce this incident |
| 532 | fn save_the_incident( |
no outgoing calls
no test coverage detected