Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9e697159
Commit
9e697159
authored
Oct 04, 2014
by
Michael Müller
Committed by
Alexandre Julliard
Oct 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix handling of page fault if a guard page and write watch is triggered at the same time.
parent
53611dfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
virtual.c
dlls/kernel32/tests/virtual.c
+0
-1
virtual.c
dlls/ntdll/virtual.c
+5
-5
No files found.
dlls/kernel32/tests/virtual.c
View file @
9e697159
...
...
@@ -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
;
...
...
dlls/ntdll/virtual.c
View file @
9e697159
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment