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 ) ...@@ -1474,11 +1474,15 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err )
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD ); VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
ret = STATUS_GUARD_PAGE_VIOLATION; ret = STATUS_GUARD_PAGE_VIOLATION;
} }
if ((err & EXCEPTION_WRITE_FAULT) && (*vprot & VPROT_WRITEWATCH)) if ((err & EXCEPTION_WRITE_FAULT) && (view->protect & VPROT_WRITEWATCH))
{
if (*vprot & VPROT_WRITEWATCH)
{ {
*vprot &= ~VPROT_WRITEWATCH; *vprot &= ~VPROT_WRITEWATCH;
VIRTUAL_SetProt( view, page, page_size, *vprot ); VIRTUAL_SetProt( view, page, page_size, *vprot );
ret = STATUS_SUCCESS; }
/* ignore fault if page is writable now */
if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
} }
} }
server_leave_uninterrupted_section( &csVirtual, &sigset ); 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