diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp index 107889f794..1eb8985f43 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp @@ -1471,10 +1471,17 @@ namespace FEX::HLE { else if (Signal == SIGSEGV && SigInfo.si_code == SEGV_ACCERR && FaultSafeMemcpy::IsFaultLocation(ArchHelpers::Context::GetPc(UContext))) { - // Return from the subroutine, returning EFAULT. - ArchHelpers::Context::SetArmReg(UContext, 0, EFAULT); - ArchHelpers::Context::SetPc(UContext, ArchHelpers::Context::GetArmReg(UContext, 30)); - return; + // If you want to emulate EFAULT behaviour then enable this if-statement. + // Do this once we find an application that depends on this. + if constexpr (false) { + // Return from the subroutine, returning EFAULT. + ArchHelpers::Context::SetArmReg(UContext, 0, EFAULT); + ArchHelpers::Context::SetPc(UContext, ArchHelpers::Context::GetArmReg(UContext, 30)); + return; + } + else { + LogMan::Msg::AFmt("Received invalid data to syscall. Crashing now!"); + } } else { if (IsAsyncSignal(&SigInfo, Signal) && MustDeferSignal) { diff --git a/unittests/FEXLinuxTests/Known_Failures b/unittests/FEXLinuxTests/Known_Failures index cc6ec373d9..435f8c30a8 100644 --- a/unittests/FEXLinuxTests/Known_Failures +++ b/unittests/FEXLinuxTests/Known_Failures @@ -19,3 +19,6 @@ sigtest_samask.32 sigtest_samask.64 sigtest_sigmask.32 sigtest_sigmask.64 + +# Disabled since FEX's FaultSafeMemcpy is intentionally stub-implemented +syscalls_efault.32