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
94ca95a6
Commit
94ca95a6
authored
Jul 28, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Fix vectored exception handler usage.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d775b9fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
exception.c
dlls/ntdll/tests/exception.c
+6
-4
No files found.
dlls/ntdll/tests/exception.c
View file @
94ca95a6
...
...
@@ -1747,6 +1747,7 @@ void CDECL hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *contex
static
void
test_kiuserexceptiondispatcher
(
void
)
{
PVOID
vectored_handler
;
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
static
BYTE
except_code
[]
=
{
...
...
@@ -1874,7 +1875,7 @@ static void test_kiuserexceptiondispatcher(void)
record
.
ExceptionAddress
=
NULL
;
/* does not matter, copied return address */
record
.
NumberParameters
=
0
;
AddVectoredExceptionHandler
(
TRUE
,
dbg_except_continue_vectored_handler
);
vectored_handler
=
AddVectoredExceptionHandler
(
TRUE
,
dbg_except_continue_vectored_handler
);
memcpy
(
pKiUserExceptionDispatcher
,
patched_KiUserExceptionDispatcher_bytes
,
sizeof
(
patched_KiUserExceptionDispatcher_bytes
));
...
...
@@ -1886,7 +1887,7 @@ static void test_kiuserexceptiondispatcher(void)
ok
(
got_exception
,
"Handler was not called.
\n
"
);
ok
(
hook_called
||
broken
(
!
hook_called
)
/* 2003 */
,
"Hook was not called.
\n
"
);
RemoveVectoredExceptionHandler
(
dbg_except_continue_
vectored_handler
);
RemoveVectoredExceptionHandler
(
vectored_handler
);
ret
=
VirtualProtect
(
pKiUserExceptionDispatcher
,
sizeof
(
saved_KiUserExceptionDispatcher_bytes
),
old_protect2
,
&
old_protect2
);
ok
(
ret
,
"Got unexpected ret %#x, GetLastError() %u.
\n
"
,
ret
,
GetLastError
());
...
...
@@ -2971,6 +2972,7 @@ void WINAPI hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *conte
static
void
test_kiuserexceptiondispatcher
(
void
)
{
LPVOID
vectored_handler
;
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
static
BYTE
except_code
[]
=
{
...
...
@@ -3099,7 +3101,7 @@ static void test_kiuserexceptiondispatcher(void)
record
.
ExceptionAddress
=
NULL
;
record
.
NumberParameters
=
0
;
AddVectoredExceptionHandler
(
TRUE
,
dbg_except_continue_vectored_handler
);
vectored_handler
=
AddVectoredExceptionHandler
(
TRUE
,
dbg_except_continue_vectored_handler
);
memcpy
(
pKiUserExceptionDispatcher
,
patched_KiUserExceptionDispatcher_bytes
,
sizeof
(
patched_KiUserExceptionDispatcher_bytes
));
...
...
@@ -3126,7 +3128,7 @@ static void test_kiuserexceptiondispatcher(void)
||
broken
(
!
hook_exception_address
)
/* 2008 */
,
"Got unexpected addresses %p, %p.
\n
"
,
hook_KiUserExceptionDispatcher_rip
,
hook_exception_address
);
RemoveVectoredExceptionHandler
(
dbg_except_continue_
vectored_handler
);
RemoveVectoredExceptionHandler
(
vectored_handler
);
memcpy
(
pKiUserExceptionDispatcher
,
patched_KiUserExceptionDispatcher_bytes
,
sizeof
(
patched_KiUserExceptionDispatcher_bytes
));
...
...
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