mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-08 06:00:16 +02:00
ARM64EC: Disable syscall callbacks when handling OvercommitTracker AVs
We don't need to be informed of our own mappings, avoids a deadlock that occurs if the ThreadCreationMutex lifetime is extended when creating a thread.
This commit is contained in:
1 parent
095b2a8926
commit
972c8a97dc
1 file changed
+9
-3
@@ -768,11 +768,18 @@ bool ResetToConsistentStateImpl(EXCEPTION_RECORD* Exception, CONTEXT* GuestConte
|
||||
}
|
||||
|
||||
NTSTATUS ResetToConsistentState(EXCEPTION_RECORD* Exception, CONTEXT* GuestContext, ARM64_NT_CONTEXT* NativeContext) {
|
||||
bool Cont {};
|
||||
if (Exception->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
|
||||
const auto FaultAddress = static_cast<uint64_t>(Exception->ExceptionInformation[1]);
|
||||
|
||||
if (OvercommitTracker && OvercommitTracker->HandleAccessViolation(FaultAddress)) {
|
||||
NtContinueNative(NativeContext, false);
|
||||
if (OvercommitTracker) {
|
||||
{
|
||||
ScopedCallbackDisable guard;
|
||||
Cont = OvercommitTracker->HandleAccessViolation(FaultAddress);
|
||||
}
|
||||
if (Cont) {
|
||||
NtContinueNative(NativeContext, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,7 +787,6 @@ NTSTATUS ResetToConsistentState(EXCEPTION_RECORD* Exception, CONTEXT* GuestConte
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool Cont {};
|
||||
{
|
||||
|
||||
ScopedCallbackDisable guard;
|
||||
|
||||
Reference in new issue
Block a user