Module: wine
Branch: master
Commit: d4052e0d709d7fddcb6a4adc10e98a8e65c8218e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d4052e0d709d7fddcb6a4adc…
Author: Paul Gofman <pgofman(a)codeweavers.com>
Date: Thu Aug 13 12:59:18 2020 +0300
ntdll/tests: Always remove hook trampoline in test_kiuserexceptiondispatcher().
As it is not removed by the hook itself if the hook is not called in the last
test.
Fixes test failures on Win 2003.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/ntdll/tests/exception.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 175c7f6183..d5b8040857 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -1886,6 +1886,9 @@ 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");
+ memcpy(pKiUserExceptionDispatcher, saved_KiUserExceptionDispatcher_bytes,
+ sizeof(saved_KiUserExceptionDispatcher_bytes));
+
RemoveVectoredExceptionHandler(vectored_handler);
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
old_protect2, &old_protect2);