parent
83d88546d3
commit
89e470250f
@ -48,18 +48,11 @@ use libafl_bolts::{
|
||||
use libafl_qemu::{
|
||||
elf::EasyElf,
|
||||
filter_qemu_args,
|
||||
// asan::{init_with_asan, QemuAsanHelper},
|
||||
modules::cmplog::{CmpLogModule, CmpLogObserver},
|
||||
modules::edges::StdEdgeCoverageModule,
|
||||
modules::AsanModule,
|
||||
Emulator,
|
||||
GuestReg,
|
||||
//snapshot::QemuSnapshotHelper,
|
||||
MmapPerms,
|
||||
QemuExecutor,
|
||||
QemuExitError,
|
||||
QemuExitReason,
|
||||
QemuShutdownCause,
|
||||
modules::{
|
||||
cmplog::{CmpLogModule, CmpLogObserver},
|
||||
edges::StdEdgeCoverageModule,
|
||||
},
|
||||
Emulator, GuestReg, MmapPerms, QemuExecutor, QemuExitError, QemuExitReason, QemuShutdownCause,
|
||||
Regs,
|
||||
};
|
||||
use libafl_targets::{edges_map_mut_ptr, EDGES_MAP_ALLOCATED_SIZE, MAX_EDGES_FOUND};
|
||||
|
@ -52,6 +52,12 @@ pub mod unix_signal_handler {
|
||||
unsafe {
|
||||
let data = &raw mut GLOBAL_STATE;
|
||||
let in_handler = (*data).set_in_handler(true);
|
||||
|
||||
assert!(
|
||||
!in_handler,
|
||||
"We crashed inside a crash handler, but this should never happen!"
|
||||
);
|
||||
|
||||
match signal {
|
||||
Signal::SigUser2 | Signal::SigAlarm => {
|
||||
if !(*data).timeout_handler.is_null() {
|
||||
@ -91,6 +97,12 @@ pub mod unix_signal_handler {
|
||||
old_hook(panic_info);
|
||||
let data = &raw mut GLOBAL_STATE;
|
||||
let in_handler = (*data).set_in_handler(true);
|
||||
|
||||
assert!(
|
||||
!in_handler,
|
||||
"We crashed inside a crash panic hook, but this should never happen!"
|
||||
);
|
||||
|
||||
if (*data).is_valid() {
|
||||
// We are fuzzing!
|
||||
let executor = (*data).executor_mut::<E>();
|
||||
|
@ -34,7 +34,13 @@ pub mod windows_asan_handler {
|
||||
Z: HasObjective<Objective = OF>,
|
||||
{
|
||||
let data = &raw mut GLOBAL_STATE;
|
||||
(*data).set_in_handler(true);
|
||||
let in_handler = (*data).set_in_handler(true);
|
||||
|
||||
assert!(
|
||||
!in_handler,
|
||||
"We crashed inside a asan death handler, but this should never happen!"
|
||||
);
|
||||
|
||||
// Have we set a timer_before?
|
||||
if (*data).ptp_timer.is_some() {
|
||||
/*
|
||||
@ -159,6 +165,12 @@ pub mod windows_exception_handler {
|
||||
unsafe {
|
||||
let data = &raw mut GLOBAL_STATE;
|
||||
let in_handler = (*data).set_in_handler(true);
|
||||
|
||||
assert!(
|
||||
!in_handler,
|
||||
"We crashed inside a crash handler, but this should never happen!"
|
||||
);
|
||||
|
||||
if !(*data).crash_handler.is_null() {
|
||||
let func: HandlerFuncPtr = transmute((*data).crash_handler);
|
||||
(func)(exception_pointers, data);
|
||||
@ -193,6 +205,12 @@ pub mod windows_exception_handler {
|
||||
panic::set_hook(Box::new(move |panic_info| unsafe {
|
||||
let data = &raw mut GLOBAL_STATE;
|
||||
let in_handler = (*data).set_in_handler(true);
|
||||
|
||||
assert!(
|
||||
!in_handler,
|
||||
"We crashed inside a panic hook, but this should never happen!"
|
||||
);
|
||||
|
||||
// Have we set a timer_before?
|
||||
if (*data).ptp_timer.is_some() {
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user