Add SnapshotModule to qemu_coverage tool (#2885)
Co-authored-by: Your Name <you@example.com>
This commit is contained in:
parent
e84429012b
commit
c5b7c7c235
@ -28,8 +28,10 @@ use libafl_bolts::{
|
|||||||
AsSlice,
|
AsSlice,
|
||||||
};
|
};
|
||||||
use libafl_qemu::{
|
use libafl_qemu::{
|
||||||
elf::EasyElf, modules::drcov::DrCovModule, ArchExtras, CallingConvention, Emulator, GuestAddr,
|
elf::EasyElf,
|
||||||
GuestReg, MmapPerms, Qemu, QemuExecutor, QemuExitReason, QemuRWError, QemuShutdownCause, Regs,
|
modules::{drcov::DrCovModule, SnapshotModule},
|
||||||
|
ArchExtras, CallingConvention, Emulator, GuestAddr, GuestReg, MmapPerms, Qemu, QemuExecutor,
|
||||||
|
QemuExitReason, QemuRWError, QemuShutdownCause, Regs,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
@ -132,10 +134,13 @@ pub fn fuzz() {
|
|||||||
let core = core_id.0;
|
let core = core_id.0;
|
||||||
cov_path.set_file_name(format!("{coverage_name}-{core:03}.{coverage_extension}"));
|
cov_path.set_file_name(format!("{coverage_name}-{core:03}.{coverage_extension}"));
|
||||||
|
|
||||||
let emulator_modules = tuple_list!(DrCovModule::builder()
|
let emulator_modules = tuple_list!(
|
||||||
|
DrCovModule::builder()
|
||||||
.filename(cov_path.clone())
|
.filename(cov_path.clone())
|
||||||
.full_trace(false)
|
.full_trace(false)
|
||||||
.build());
|
.build(),
|
||||||
|
SnapshotModule::new()
|
||||||
|
);
|
||||||
|
|
||||||
let emulator = Emulator::empty()
|
let emulator = Emulator::empty()
|
||||||
.qemu_parameters(options.args.clone())
|
.qemu_parameters(options.args.clone())
|
||||||
@ -200,7 +205,7 @@ pub fn fuzz() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut harness =
|
let mut harness =
|
||||||
|emulator: &mut Emulator<_, _, _, _, _, _, _>, state: &mut _, input: &BytesInput| {
|
|emulator: &mut Emulator<_, _, _, _, _, _, _>, _state: &mut _, input: &BytesInput| {
|
||||||
let qemu = emulator.qemu();
|
let qemu = emulator.qemu();
|
||||||
|
|
||||||
let target = input.target_bytes();
|
let target = input.target_bytes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user