mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 17:29:19 +00:00
Check that we can really read at the faulty eip in Windows prior to decoding
the instruction. Also fix the unrecoverable fault dump to really be useful.
This commit is contained in:
parent
0c8d0cd8be
commit
c10046c137
@ -754,6 +754,10 @@ static bool ix86_skip_instruction(unsigned long * regs)
|
||||
|
||||
if (eip == 0)
|
||||
return false;
|
||||
#ifdef _WIN32
|
||||
if (IsBadCodePtr((FARPROC)eip))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
transfer_type_t transfer_type = SIGSEGV_TRANSFER_UNKNOWN;
|
||||
transfer_size_t transfer_size = SIZE_LONG;
|
||||
@ -1514,12 +1518,11 @@ static bool handle_badaccess(SIGSEGV_FAULT_HANDLER_ARGLIST_1)
|
||||
break;
|
||||
#endif
|
||||
case SIGSEGV_RETURN_FAILURE:
|
||||
return false;
|
||||
// We can't do anything with the fault_address, dump state?
|
||||
if (sigsegv_state_dumper != 0)
|
||||
sigsegv_state_dumper(fault_address, fault_instruction);
|
||||
break;
|
||||
}
|
||||
|
||||
// We can't do anything with the fault_address, dump state?
|
||||
if (sigsegv_state_dumper != 0)
|
||||
sigsegv_state_dumper(fault_address, fault_instruction);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user