initial commit
All checks were successful
CI / fuzz (push) Successful in 1m41s
CI / lint (push) Successful in 16s
CI / test (push) Successful in 22s

This commit is contained in:
Kamal Tufekcic 2026-07-27 10:12:04 +03:00
commit a2922b8bad
59 changed files with 2684583 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#![no_main]
//! The single-function disassembly consumers: `candidate_entries` linear-sweeps the exec sections,
//! then `abi_shape` (backward register liveness) and `make_sig` (wildcard-emitting decode) run from
//! each entry. All decode attacker-controlled code bytes and must never panic — the decoder can hit
//! any instruction, any truncation, any span boundary.
use source2rosetta::elf::CodeImage;
use source2rosetta::{abi, emit, locate};
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let Ok(img) = CodeImage::from_bytes(data.to_vec()) else {
return;
};
for &addr in locate::candidate_entries(&img).iter().take(96) {
// Discard results: this fuzzer only asserts the decoders never panic.
let _ = abi::abi_shape(&img, addr);
let _ = emit::make_sig(&img, addr, 128);
}
});