mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 06:00:45 +00:00
ntdll: Fix handling of page fault if a guard page and write watch is triggered at the same time.
This commit is contained in:
parent
53611dfbab
commit
9e69715900
@ -1728,7 +1728,6 @@ static void test_guard_page(void)
|
||||
num_guard_page_calls = 0;
|
||||
*value = 1;
|
||||
*(value + 1) = 2;
|
||||
todo_wine
|
||||
ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls );
|
||||
|
||||
pNtCurrentTeb()->Tib.ExceptionList = frame.Prev;
|
||||
|
@ -1522,11 +1522,6 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err )
|
||||
{
|
||||
void *page = ROUND_ADDR( addr, page_mask );
|
||||
BYTE *vprot = &view->prot[((const char *)page - (const char *)view->base) >> page_shift];
|
||||
if (*vprot & VPROT_GUARD)
|
||||
{
|
||||
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
|
||||
ret = STATUS_GUARD_PAGE_VIOLATION;
|
||||
}
|
||||
if ((err & EXCEPTION_WRITE_FAULT) && (view->protect & VPROT_WRITEWATCH))
|
||||
{
|
||||
if (*vprot & VPROT_WRITEWATCH)
|
||||
@ -1537,6 +1532,11 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err )
|
||||
/* ignore fault if page is writable now */
|
||||
if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
|
||||
}
|
||||
if (*vprot & VPROT_GUARD)
|
||||
{
|
||||
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
|
||||
ret = STATUS_GUARD_PAGE_VIOLATION;
|
||||
}
|
||||
}
|
||||
server_leave_uninterrupted_section( &csVirtual, &sigset );
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user