Commit 5e7f7db9 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Ignore spurious write faults for a write watch that has been reset already.

parent 8ec60e97
......@@ -1474,11 +1474,15 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err )
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
ret = STATUS_GUARD_PAGE_VIOLATION;
}
if ((err & EXCEPTION_WRITE_FAULT) && (*vprot & VPROT_WRITEWATCH))
if ((err & EXCEPTION_WRITE_FAULT) && (view->protect & VPROT_WRITEWATCH))
{
*vprot &= ~VPROT_WRITEWATCH;
VIRTUAL_SetProt( view, page, page_size, *vprot );
ret = STATUS_SUCCESS;
if (*vprot & VPROT_WRITEWATCH)
{
*vprot &= ~VPROT_WRITEWATCH;
VIRTUAL_SetProt( view, page, page_size, *vprot );
}
/* ignore fault if page is writable now */
if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
}
}
server_leave_uninterrupted_section( &csVirtual, &sigset );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment