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
e2b8fad7
Commit
e2b8fad7
authored
Dec 09, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Consistently use %I printf format for ULONG_PTR values.
parent
8414449c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
virtual.c
dlls/kernel32/tests/virtual.c
+19
-19
No files found.
dlls/kernel32/tests/virtual.c
View file @
e2b8fad7
...
...
@@ -2269,7 +2269,7 @@ static void test_guard_page(void)
ok
(
ret
,
"VirtualQuery failed %lu
\n
"
,
GetLastError
());
ok
(
info
.
BaseAddress
==
base
,
"BaseAddress %p instead of %p
\n
"
,
info
.
BaseAddress
,
base
);
ok
(
info
.
AllocationProtect
==
(
PAGE_READWRITE
|
PAGE_GUARD
),
"wrong AllocationProtect %lx
\n
"
,
info
.
AllocationProtect
);
ok
(
info
.
RegionSize
==
size
,
"wrong RegionSize 0x%
l
x
\n
"
,
info
.
RegionSize
);
ok
(
info
.
RegionSize
==
size
,
"wrong RegionSize 0x%
I
x
\n
"
,
info
.
RegionSize
);
ok
(
info
.
State
==
MEM_COMMIT
,
"wrong State 0x%lx
\n
"
,
info
.
State
);
ok
(
info
.
Protect
==
(
PAGE_READWRITE
|
PAGE_GUARD
),
"wrong Protect 0x%lx
\n
"
,
info
.
Protect
);
ok
(
info
.
Type
==
MEM_PRIVATE
,
"wrong Type 0x%lx
\n
"
,
info
.
Type
);
...
...
@@ -2308,7 +2308,7 @@ static void test_guard_page(void)
ok
(
ret
,
"VirtualQuery failed %lu
\n
"
,
GetLastError
());
ok
(
info
.
BaseAddress
==
base
,
"BaseAddress %p instead of %p
\n
"
,
info
.
BaseAddress
,
base
);
ok
(
info
.
AllocationProtect
==
(
PAGE_READWRITE
|
PAGE_GUARD
),
"wrong AllocationProtect %lx
\n
"
,
info
.
AllocationProtect
);
ok
(
info
.
RegionSize
==
size
,
"wrong RegionSize 0x%
l
x
\n
"
,
info
.
RegionSize
);
ok
(
info
.
RegionSize
==
size
,
"wrong RegionSize 0x%
I
x
\n
"
,
info
.
RegionSize
);
ok
(
info
.
State
==
MEM_COMMIT
,
"wrong State 0x%lx
\n
"
,
info
.
State
);
todo_wine
ok
(
info
.
Protect
==
PAGE_READWRITE
,
"wrong Protect 0x%lx
\n
"
,
info
.
Protect
);
...
...
@@ -2385,7 +2385,7 @@ static void test_guard_page(void)
ok
(
ret
,
"VirtualQuery failed %lu
\n
"
,
GetLastError
()
);
ok
(
info
.
BaseAddress
==
base
,
"BaseAddress %p instead of %p
\n
"
,
info
.
BaseAddress
,
base
);
ok
(
info
.
AllocationProtect
==
(
PAGE_READWRITE
|
PAGE_GUARD
),
"wrong AllocationProtect %lx
\n
"
,
info
.
AllocationProtect
);
ok
(
info
.
RegionSize
==
size
,
"wrong RegionSize 0x%
l
x
\n
"
,
info
.
RegionSize
);
ok
(
info
.
RegionSize
==
size
,
"wrong RegionSize 0x%
I
x
\n
"
,
info
.
RegionSize
);
ok
(
info
.
State
==
MEM_COMMIT
,
"wrong State 0x%lx
\n
"
,
info
.
State
);
ok
(
info
.
Protect
==
(
PAGE_READWRITE
|
PAGE_GUARD
),
"wrong Protect 0x%lx
\n
"
,
info
.
Protect
);
ok
(
info
.
Type
==
MEM_PRIVATE
,
"wrong Type 0x%lx
\n
"
,
info
.
Type
);
...
...
@@ -2393,7 +2393,7 @@ static void test_guard_page(void)
count
=
64
;
ret
=
pGetWriteWatch
(
0
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong count %
I
u
\n
"
,
count
);
/* writing to a page should trigger should trigger guard page, even if write watch is set */
frame
.
Handler
=
guard_page_handler
;
...
...
@@ -2410,7 +2410,7 @@ static void test_guard_page(void)
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
1
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
1
,
"wrong count %
I
u
\n
"
,
count
);
ok
(
results
[
0
]
==
base
,
"wrong result %p
\n
"
,
results
[
0
]
);
success
=
VirtualProtect
(
base
,
size
,
PAGE_READWRITE
|
PAGE_GUARD
,
&
old_prot
);
...
...
@@ -2432,7 +2432,7 @@ static void test_guard_page(void)
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
1
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
1
,
"wrong count %
I
u
\n
"
,
count
);
ok
(
results
[
0
]
==
base
,
"wrong result %p
\n
"
,
results
[
0
]
);
success
=
VirtualProtect
(
base
,
size
,
PAGE_READWRITE
|
PAGE_GUARD
,
&
old_prot
);
...
...
@@ -2448,7 +2448,7 @@ static void test_guard_page(void)
count
=
64
;
ret
=
pGetWriteWatch
(
0
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong count %
I
u
\n
"
,
count
);
success
=
VirtualLock
(
base
,
size
);
todo_wine
...
...
@@ -2465,7 +2465,7 @@ static void test_guard_page(void)
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
todo_wine
ok
(
count
==
1
||
broken
(
count
==
0
)
/* Windows 8 */
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
1
||
broken
(
count
==
0
)
/* Windows 8 */
,
"wrong count %
I
u
\n
"
,
count
);
todo_wine
ok
(
results
[
0
]
==
base
||
broken
(
results
[
0
]
==
(
void
*
)
0xdeadbeef
)
/* Windows 8 */
,
"wrong result %p
\n
"
,
results
[
0
]
);
...
...
@@ -2480,7 +2480,7 @@ static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
ULONG
flags
=
MEM_EXECUTE_OPTION_ENABLE
;
DWORD
err
;
trace
(
"exception: %08lx flags:%lx addr:%p info[0]:%
l
d info[1]:%p
\n
"
,
trace
(
"exception: %08lx flags:%lx addr:%p info[0]:%
I
d info[1]:%p
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
rec
->
ExceptionInformation
[
0
],
(
void
*
)
rec
->
ExceptionInformation
[
1
]
);
...
...
@@ -2524,7 +2524,7 @@ static LONG CALLBACK execute_fault_vec_handler( EXCEPTION_POINTERS *ExceptionInf
DWORD
old_prot
;
BOOL
success
;
trace
(
"exception: %08lx flags:%lx addr:%p info[0]:%
l
d info[1]:%p
\n
"
,
trace
(
"exception: %08lx flags:%lx addr:%p info[0]:%
I
d info[1]:%p
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
rec
->
ExceptionInformation
[
0
],
(
void
*
)
rec
->
ExceptionInformation
[
1
]
);
...
...
@@ -2916,7 +2916,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong count %
I
u
\n
"
,
count
);
memcpy
(
base
,
code_jmp
,
sizeof
(
code_jmp
)
);
*
(
DWORD
*
)(
base
+
1
)
=
(
DWORD_PTR
)
jmp_test_func
-
(
DWORD_PTR
)(
base
+
5
);
...
...
@@ -2924,7 +2924,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
1
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
1
,
"wrong count %
I
u
\n
"
,
count
);
ok
(
results
[
0
]
==
base
,
"wrong result %p
\n
"
,
results
[
0
]
);
/* Create a new window class and associated Window (see above) */
...
...
@@ -2952,7 +2952,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong count %
I
u
\n
"
,
count
);
/* At first try with an instruction which is not recognized as proper ATL thunk
* by the Windows ATL Thunk Emulator. Removing execute permissions will lead to
...
...
@@ -2972,7 +2972,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong count %
I
u
\n
"
,
count
);
ret
=
send_message_excpt
(
hWnd
,
WM_USER
,
0
,
0
);
ok
(
ret
==
42
,
"call returned wrong result, expected 42, got %ld
\n
"
,
ret
);
...
...
@@ -3001,7 +3001,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
||
broken
(
count
==
1
)
/* Windows 8 */
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
||
broken
(
count
==
1
)
/* Windows 8 */
,
"wrong count %
I
u
\n
"
,
count
);
/* Now test with a proper ATL thunk instruction. */
...
...
@@ -3011,7 +3011,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
1
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
1
,
"wrong count %
I
u
\n
"
,
count
);
ok
(
results
[
0
]
==
base
,
"wrong result %p
\n
"
,
results
[
0
]
);
success
=
VirtualProtect
(
base
,
size
,
PAGE_EXECUTE_READWRITE
,
&
old_prot
);
...
...
@@ -3036,7 +3036,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong count %
I
u
\n
"
,
count
);
ret
=
send_message_excpt
(
hWnd
,
WM_USER
,
0
,
0
);
ok
(
ret
==
43
,
"call returned wrong result, expected 43, got %ld
\n
"
,
ret
);
...
...
@@ -3066,7 +3066,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
0
||
broken
(
count
==
1
)
/* Windows 8 */
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
0
||
broken
(
count
==
1
)
/* Windows 8 */
,
"wrong count %
I
u
\n
"
,
count
);
/* Restore the JMP instruction, set to executable, and then destroy the Window */
...
...
@@ -3076,7 +3076,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
count
=
64
;
ret
=
pGetWriteWatch
(
WRITE_WATCH_FLAG_RESET
,
base
,
size
,
results
,
&
count
,
&
pagesize
);
ok
(
!
ret
,
"GetWriteWatch failed %lu
\n
"
,
GetLastError
()
);
ok
(
count
==
1
,
"wrong count %
l
u
\n
"
,
count
);
ok
(
count
==
1
,
"wrong count %
I
u
\n
"
,
count
);
ok
(
results
[
0
]
==
base
,
"wrong result %p
\n
"
,
results
[
0
]
);
success
=
VirtualProtect
(
base
,
size
,
PAGE_EXECUTE_READWRITE
,
&
old_prot
);
...
...
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