mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-27 12:31:50 +01:00
Fix crashes due to SEGV_ACCERR
check
On certain devices, accesses to a protected memory region can return `si_code` as non-`SEGV_ACCERR` values, this leads to a crash as we only pass access violations to the trap handler and would lead to not doing so on those devices which would then result in going to the crash handler.
This commit is contained in:
parent
0849d8b116
commit
f2faa74707
@ -76,7 +76,7 @@ namespace skyline::nce {
|
||||
auto &mctx{ctx->uc_mcontext};
|
||||
const auto &state{*reinterpret_cast<ThreadContext *>(*tls)->state};
|
||||
|
||||
if (signal == SIGSEGV && info->si_code == SEGV_ACCERR)
|
||||
if (signal == SIGSEGV)
|
||||
// If we get a guest access violation then we want to handle any accesses that may be from a trapped region
|
||||
if (state.nce->TrapHandler(reinterpret_cast<u8 *>(info->si_addr), true))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user