Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- include/winuser.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/winuser.h b/include/winuser.h index f9af7db0331..3d0451adff6 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -97,6 +97,7 @@ typedef void* HPOWERNOTIFY; #define UOI_NAME 2 #define UOI_TYPE 3 #define UOI_USER_SID 4 +#define UOI_TIMERPROC_EXCEPTION_SUPPRESSION 7
#define WSF_VISIBLE 1 #define DF_ALLOWOTHERACCOUNTHOOK 1
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/user32/tests/msg.c | 130 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index a2adf56565d..a2264361c24 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -34,6 +34,8 @@ #include "commctrl.h"
#include "wine/test.h" +#include "wine/asm.h" +#include "wine/exception.h"
#define MDI_FIRST_CHILD_ID 2004
@@ -10648,8 +10650,17 @@ static void CALLBACK callback_count(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWOR }
static DWORD exception; +static BOOL *tproc_exc_suppress = NULL; static void CALLBACK callback_exception(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { + if (tproc_exc_suppress) + { + BOOL res = SetUserObjectInformationW(GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, tproc_exc_suppress, sizeof(*tproc_exc_suppress)); + todo_wine + ok(res, "SetUserObjectInformationW error %lu\n", GetLastError()); + tproc_exc_suppress = NULL; + } + count++; RaiseException(exception, 0, 0, NULL); } @@ -10813,10 +10824,116 @@ static void test_timers_no_wnd(void) while (i > 0) KillTimer(NULL, ids[--i]); }
+static LONG WINAPI timer_exception_filter(EXCEPTION_POINTERS *eptr) +{ + if (eptr->ExceptionRecord->ExceptionCode == exception && + eptr->ExceptionRecord->ExceptionFlags == 0 && + eptr->ExceptionRecord->NumberParameters == 0) + { + exception = 0; + return EXCEPTION_CONTINUE_EXECUTION; + } + + return EXCEPTION_CONTINUE_SEARCH; +} + +#if defined(USE_COMPILER_EXCEPTIONS) || defined(__i386__) +static void dispatch_message_handle_exception(const MSG *msg) +{ + __TRY + { + DispatchMessageA( msg ); + } + __EXCEPT(timer_exception_filter) + { + } + __ENDTRY +} +#else +EXCEPTION_DISPOSITION WINAPI timer_exception_handler( EXCEPTION_RECORD *rec, + void *frame, + CONTEXT *context, + DISPATCHER_CONTEXT *dispatch ) +{ + EXCEPTION_POINTERS ptrs = { rec, context }; + + if (timer_exception_filter( &ptrs ) == EXCEPTION_CONTINUE_EXECUTION) + return ExceptionContinueExecution; + + return ExceptionContinueSearch; +} + +extern void dispatch_message_handle_exception(const MSG *msg); +#if defined(__x86_64__) +__ASM_GLOBAL_FUNC( dispatch_message_handle_exception, + __ASM_SEH(".seh_handler " __ASM_NAME("timer_exception_handler") ", @except\n\t") + "subq $0x28,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") + __ASM_SEH(".seh_stackalloc 0x28\n\t") + __ASM_SEH(".seh_endprologue\n\t") + "callq *__imp_DispatchMessageA(%rip)\n\t" + "nop\n\t" + "addq $0x28,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -0x28\n\t") + "ret" ); +#elif defined(__arm__) +__ASM_GLOBAL_FUNC( dispatch_message_handle_exception, + "1:\n\t" + "push {r4,lr}\n\t" + __ASM_CFI(".cfi_def_cfa_offset 8\n\t") + __ASM_CFI(".cfi_offset r4, -8\n\t") + __ASM_CFI(".cfi_offset lr, -4\n\t") + "ldr ip, =__imp_DispatchMessageA\n\t" + "ldr ip, [ip]\n\t" + "blx ip\n\t" + "pop {r4,pc}\n" + "2:\n\t" + ".section ".pdata", "dr"\n\t" + ".rva " __ASM_NAME("dispatch_message_handle_exception") "\n\t" + ".rva .Lunwind__dispatch_message_handle_exception\n\t" + ".section ".xdata", "dr"\n" + ".Lunwind__dispatch_message_handle_exception:\n\t" + ".long 0x10100000 + ((2b - 1b) / 2)\n\t" + ".long 0xfbfbffd4\n\t" + ".rva " __ASM_NAME("timer_exception_handler") "\n\t" + ".text" ); +#elif defined(__aarch64__) +__ASM_GLOBAL_FUNC( dispatch_message_handle_exception, + __ASM_SEH(".seh_handler " __ASM_NAME("timer_exception_handler") ", @except\n\t") + "stp x29, x30, [sp, #-16]!\n\t" + __ASM_CFI(".cfi_def_cfa_offset 16\n\t") + __ASM_CFI(".cfi_offset x29, -16\n\t") + __ASM_CFI(".cfi_offset x30, -8\n\t") + __ASM_SEH(".seh_save_fplr_x 16\n\t") + __ASM_SEH(".seh_endprologue\n\t") + "mov x29, sp\n\t" + "adrp x8, __imp_DispatchMessageA\n\t" + "ldr x8, [x8, :lo12:__imp_DispatchMessageA]\n\t" + "blr x8\n\t" + "nop\n\t" + __ASM_SEH(".seh_startepilogue\n\t") + "ldp x29, x30, [sp], #16\n\t" + __ASM_CFI(".cfi_restore x29\n\t") + __ASM_CFI(".cfi_restore x30\n\t") + __ASM_CFI(".cfi_def_cfa sp, 0\n\t") + __ASM_SEH(".seh_save_fplr_x 16\n\t") + __ASM_SEH(".seh_endepilogue\n\t") + "ret" ); +#else +void dispatch_message_handle_exception(const MSG *msg) +{ + skip("dispatch_message_handle_exception not implemented\n"); + count++; + exception = 0; +} +#endif +#endif + static void test_timers_exception(DWORD code) { UINT_PTR id; MSG msg; + BOOL ret, value;
exception = code; id = SetTimer(NULL, 0, 1000, callback_exception); @@ -10831,6 +10948,19 @@ static void test_timers_exception(DWORD code) DispatchMessageA(&msg); ok(count == 1, "did not get one count as expected (%i).\n", count);
+ value = FALSE; + tproc_exc_suppress = &value; + count = 0; + dispatch_message_handle_exception(&msg); + ok(count == 1, "expected count to be 1, got %d\n", count); + todo_wine + ok(exception == 0, "exception from timer procedure shall be propagated\n"); + + value = TRUE; + ret = SetUserObjectInformationW(GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, &value, sizeof(value)); + todo_wine + ok(ret, "SetUserObjectInformation error %lu\n", GetLastError()); + KillTimer(NULL, id); }
On 4/18/22 19:48, Jinoh Kang wrote:
+#elif defined(__aarch64__) +__ASM_GLOBAL_FUNC( dispatch_message_handle_exception,
__ASM_SEH(".seh_handler " __ASM_NAME("timer_exception_handler") ", @except\n\t")
"stp x29, x30, [sp, #-16]!\n\t"
__ASM_CFI(".cfi_def_cfa_offset 16\n\t")
__ASM_CFI(".cfi_offset x29, -16\n\t")
__ASM_CFI(".cfi_offset x30, -8\n\t")
__ASM_SEH(".seh_save_fplr_x 16\n\t")
__ASM_SEH(".seh_endprologue\n\t")
"mov x29, sp\n\t"
"adrp x8, __imp_DispatchMessageA\n\t"
"ldr x8, [x8, :lo12:__imp_DispatchMessageA]\n\t"
"blr x8\n\t"
"nop\n\t"
__ASM_SEH(".seh_startepilogue\n\t")
"ldp x29, x30, [sp], #16\n\t"
__ASM_CFI(".cfi_restore x29\n\t")
__ASM_CFI(".cfi_restore x30\n\t")
__ASM_CFI(".cfi_def_cfa sp, 0\n\t")
.cfi_def_cfa_offset 0 *
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112729
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
Report validation errors: user32:msg crashed (c0000005)
=== w7u_adm (32 bit report) ===
user32: 0868:msg: unhandled exception c0000005 at 80000003
=== w7u_el (32 bit report) ===
user32: 086c:msg: unhandled exception c0000005 at 80000003
=== w8 (32 bit report) ===
user32: msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1
=== w8adm (32 bit report) ===
user32: msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1
=== w864 (32 bit report) ===
user32: msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated
=== w1064v1507 (32 bit report) ===
user32: msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10957: Test failed: exception from timer procedure shall be propagated
=== w864 (64 bit report) ===
user32: msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1
=== w1064v1507 (64 bit report) ===
user32: msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1 msg.c:10660: Test failed: SetUserObjectInformationW error 1 msg.c:10957: Test failed: exception from timer procedure shall be propagated msg.c:10962: Test failed: SetUserObjectInformation error 1
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/user32/message.c | 11 ++++++++++- dlls/user32/tests/msg.c | 3 --- dlls/user32/user32.spec | 2 +- dlls/user32/user_main.c | 1 + dlls/user32/user_private.h | 1 + dlls/user32/winstation.c | 23 ++++++++++++++++++++++- 6 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 611f603fc1e..8be708a118d 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -851,6 +851,15 @@ BOOL WINAPI TranslateMessage( const MSG *msg ) }
+static LONG WINAPI timerproc_exception_filter(EXCEPTION_POINTERS *eptr) +{ + if (suppress_timerproc_exception) + return EXCEPTION_EXECUTE_HANDLER; + + return EXCEPTION_CONTINUE_SEARCH; +} + + /*********************************************************************** * DispatchMessageA (USER32.@) * @@ -870,7 +879,7 @@ LRESULT WINAPI DECLSPEC_HOTPATCH DispatchMessageA( const MSG* msg ) retval = CallWindowProcA( (WNDPROC)msg->lParam, msg->hwnd, msg->message, msg->wParam, GetTickCount() ); } - __EXCEPT_ALL + __EXCEPT(timerproc_exception_filter) { retval = 0; } diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index a2264361c24..96ef7baed06 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -10656,7 +10656,6 @@ static void CALLBACK callback_exception(HWND hwnd, UINT uMsg, UINT_PTR idEvent, if (tproc_exc_suppress) { BOOL res = SetUserObjectInformationW(GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, tproc_exc_suppress, sizeof(*tproc_exc_suppress)); - todo_wine ok(res, "SetUserObjectInformationW error %lu\n", GetLastError()); tproc_exc_suppress = NULL; } @@ -10953,12 +10952,10 @@ static void test_timers_exception(DWORD code) count = 0; dispatch_message_handle_exception(&msg); ok(count == 1, "expected count to be 1, got %d\n", count); - todo_wine ok(exception == 0, "exception from timer procedure shall be propagated\n");
value = TRUE; ret = SetUserObjectInformationW(GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, &value, sizeof(value)); - todo_wine ok(ret, "SetUserObjectInformation error %lu\n", GetLastError());
KillTimer(NULL, id); diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 783684e8cc7..6e288f6e315 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -714,7 +714,7 @@ @ stdcall SetThreadDpiAwarenessContext(ptr) @ stdcall SetTimer(long long long ptr) @ stdcall SetUserObjectInformationA(long long ptr long) -@ stdcall SetUserObjectInformationW(long long ptr long) NtUserSetObjectInformation +@ stdcall SetUserObjectInformationW(long long ptr long) @ stdcall SetUserObjectSecurity(long ptr ptr) @ stdcall SetWinEventHook(long long long ptr long long long) @ stdcall SetWindowCompositionAttribute(ptr ptr) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index c477d0325d3..7e37ff36251 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(graphics); WINE_DECLARE_DEBUG_CHANNEL(message);
HMODULE user32_module = 0; +BOOL suppress_timerproc_exception = TRUE;
static DWORD exiting_thread_id;
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 52e57a5e6f1..8970569d45c 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -66,6 +66,7 @@ static inline struct user_thread_info *get_user_thread_info(void) }
extern HMODULE user32_module DECLSPEC_HIDDEN; +extern BOOL suppress_timerproc_exception DECLSPEC_HIDDEN;
struct dce; struct tagWND; diff --git a/dlls/user32/winstation.c b/dlls/user32/winstation.c index c0c8ec7a14f..495e22727dc 100644 --- a/dlls/user32/winstation.c +++ b/dlls/user32/winstation.c @@ -389,12 +389,33 @@ BOOL WINAPI GetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DW }
+/****************************************************************************** + * SetUserObjectInformationW (USER32.@) + */ +BOOL WINAPI SetUserObjectInformationW( HANDLE handle, INT index, LPVOID info, DWORD len ) +{ + if (index == UOI_TIMERPROC_EXCEPTION_SUPPRESSION) + { + if (handle != GetCurrentProcess() || len != sizeof(BOOL)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + suppress_timerproc_exception = *(const BOOL *)info; + return TRUE; + } + + return NtUserSetObjectInformation( handle, index, info, len ); +} + + /****************************************************************************** * SetUserObjectInformationA (USER32.@) */ BOOL WINAPI SetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DWORD len ) { - return NtUserSetObjectInformation( handle, index, info, len ); + return SetUserObjectInformationW( handle, index, info, len ); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112730
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: 06e4:msg: unhandled exception c0000005 at 80000003
=== w7u_adm (32 bit report) ===
user32: 0ba4:msg: unhandled exception c0000005 at 80000003
=== w7u_el (32 bit report) ===
user32: 0870:msg: unhandled exception c0000005 at 80000003
=== w8 (32 bit report) ===
user32: msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1
=== w8adm (32 bit report) ===
user32: msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1
=== w864 (32 bit report) ===
user32: msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated
=== w1064v1507 (32 bit report) ===
user32: msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10955: Test failed: exception from timer procedure shall be propagated
=== w864 (64 bit report) ===
user32: msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1
=== w1064v1507 (64 bit report) ===
user32: msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1 msg.c:10659: Test failed: SetUserObjectInformationW error 1 msg.c:10955: Test failed: exception from timer procedure shall be propagated msg.c:10959: Test failed: SetUserObjectInformation error 1
=== debian11 (32 bit report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit Arabic:Morocco report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit German report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit French report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit Hebrew:Israel report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit Hindi:India report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit Japanese:Japan report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit Chinese:China report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
=== debian11 (32 bit WoW report) ===
user32: Unhandled exception: privileged instruction in 32-bit code (0x7b012117).
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/win32u/tests/win32u.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 401913f0aee..51a84239dfb 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -505,6 +505,44 @@ static void test_window_text(void) DestroyWindow( hwnd ); }
+static void test_NtUserSetObjectInformation(void) +{ + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetProcessWindowStation(), -1, (void *)-1, -1UL ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetProcessWindowStation(), UOI_FLAGS, (void *)NULL, sizeof(USEROBJECTFLAGS) ); + todo_wine + ok( GetLastError() == ERROR_NOACCESS, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetThreadDesktop(GetCurrentThreadId()), UOI_FLAGS, (void *)NULL, sizeof(USEROBJECTFLAGS) ); + todo_wine + ok( GetLastError() == ERROR_NOACCESS, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)TRUE, 0 ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)0xdeadbeef, 0xdeadbeef ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)-1, -1 ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( NULL, UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)-1, -1 ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); +} + START_TEST(win32u) { /* native win32u.dll fails if user32 is not loaded, so make sure it's fully initialized */ @@ -519,4 +557,5 @@ START_TEST(win32u) test_window_text();
test_NtUserCloseWindowStation(); + test_NtUserSetObjectInformation(); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112731
Your paranoid android.
=== w1064v1809 (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w1064 (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w1064_2qxl (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w1064_tsign (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64 (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_ar (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_he (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_ja (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_zh_CN (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/win32u/tests/win32u.c | 4 ---- dlls/win32u/winstation.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 51a84239dfb..720cbc40dcf 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -524,22 +524,18 @@ static void test_NtUserSetObjectInformation(void)
SetLastError( 0xdeadbeef ); NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)TRUE, 0 ); - todo_wine ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)0xdeadbeef, 0xdeadbeef ); - todo_wine ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)-1, -1 ); - todo_wine ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); NtUserSetObjectInformation( NULL, UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)-1, -1 ); - todo_wine ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); }
diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c index a25edfc9771..4f07fba10ba 100644 --- a/dlls/win32u/winstation.c +++ b/dlls/win32u/winstation.c @@ -372,6 +372,8 @@ BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DW BOOL ret; const USEROBJECTFLAGS *obj_flags = info;
+ if (index == UOI_TIMERPROC_EXCEPTION_SUPPRESSION) return TRUE; + if (index != UOI_FLAGS || !info || len < sizeof(*obj_flags)) { SetLastError( ERROR_INVALID_PARAMETER );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112732
Your paranoid android.
=== w1064v1809 (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w1064 (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w1064_2qxl (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w1064_tsign (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64 (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_ar (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_he (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_ja (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998
=== w10pro64_zh_CN (64 bit report) ===
win32u: win32u.c:513: Test failed: NtUserSetObjectInformation error 998