Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5f49f07d
Commit
5f49f07d
authored
Jan 03, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Handle write watches in virtual_uninterrupted_write_memory.
parent
33766482
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
virtual.c
dlls/ntdll/virtual.c
+24
-5
No files found.
dlls/ntdll/virtual.c
View file @
5f49f07d
...
...
@@ -1729,12 +1729,31 @@ SIZE_T virtual_uninterrupted_write_memory( void *addr, const void *buffer, SIZE_
{
if
(
!
(
view
->
protect
&
VPROT_SYSTEM
))
{
void
*
page
=
ROUND_ADDR
(
addr
,
page_mask
);
BYTE
*
p
=
view
->
prot
+
(((
const
char
*
)
page
-
(
const
char
*
)
view
->
base
)
>>
page_shift
);
while
(
bytes_written
<
size
&&
(
VIRTUAL_GetUnixProt
(
*
p
++
)
&
PROT_WRITE
))
while
(
bytes_written
<
size
)
{
SIZE_T
block_size
=
min
(
size
,
page_size
-
((
UINT_PTR
)
addr
&
page_mask
)
);
void
*
page
=
ROUND_ADDR
(
addr
,
page_mask
);
BYTE
*
p
=
view
->
prot
+
(((
const
char
*
)
page
-
(
const
char
*
)
view
->
base
)
>>
page_shift
);
SIZE_T
block_size
;
/* If the page is not writeable then check for write watches
* before giving up. This can be done without raising a real
* exception. Similar to virtual_handle_fault. */
if
(
!
(
VIRTUAL_GetUnixProt
(
*
p
)
&
PROT_WRITE
))
{
if
(
!
(
view
->
protect
&
VPROT_WRITEWATCH
))
break
;
if
(
*
p
&
VPROT_WRITEWATCH
)
{
*
p
&=
~
VPROT_WRITEWATCH
;
VIRTUAL_SetProt
(
view
,
page
,
page_size
,
*
p
);
}
/* ignore fault if page is writable now */
if
(
!
(
VIRTUAL_GetUnixProt
(
*
p
)
&
PROT_WRITE
))
break
;
}
block_size
=
min
(
size
,
page_size
-
((
UINT_PTR
)
addr
&
page_mask
)
);
memcpy
(
addr
,
buffer
,
block_size
);
addr
=
(
void
*
)((
char
*
)
addr
+
block_size
);
...
...
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