mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
boot stability after forced termination
This commit is contained in:
parent
03d2502cc6
commit
4fa3294118
@ -2646,6 +2646,14 @@ static bool handle_badaccess(SIGSEGV_FAULT_HANDLER_ARGLIST_1)
|
||||
x86_thread_state64_t *ts = &SIP->thr_state;
|
||||
uint8_t *rip = (uint8_t *)ts->__rip;
|
||||
switch (rip[0]) {
|
||||
case 0x44:
|
||||
if (rip[1] == 0xf && rip[2] == 0xb6 && rip[3] == 0x20) {
|
||||
ts->__r12 = safeLoad<uint8_t>(ts->__rax);
|
||||
ts->__rip += 4;
|
||||
mach_set_thread_state(SIP);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case 0x48:
|
||||
if (rip[1] == 0xc7 && rip[2] == 0) {
|
||||
safeStore<uint64_t>(ts->__rax, rip[3] | rip[4] << 8 | rip[5] << 16 | rip[6] << 24);
|
||||
|
Loading…
Reference in New Issue
Block a user