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:
Billy Laws committed 2025-08-12 00:50:51 +01:00
1 parent 095b2a8926
commit 972c8a97dc
1 file changed
+9 -3
+9 -3
View File
@@ -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;