From e8fee88c5099ca15991159e3a6f657539eb4d4e4 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 22 Jun 2014 20:39:59 +0200 Subject: [PATCH] Remove several patches (accepted upstream). --- README.md | 2 - debian/changelog | 4 + ...BG_PRINTEXCEPTION_C-exception-in-Out.patch | 145 ------------------ .../d85bf5ee-3578-4edd-be3e-35cacd53e5cc.def | 3 - ...e-condition-when-unloading-module-wh.patch | 124 --------------- .../46fb5f97-34cb-4b6b-ae10-7511db90ba1d.def | 4 - patches/patch-list.patch | 4 +- 7 files changed, 5 insertions(+), 281 deletions(-) delete mode 100644 patches/14-OutputDebugStringA/0001-kernel32-Raise-DBG_PRINTEXCEPTION_C-exception-in-Out.patch delete mode 100644 patches/14-OutputDebugStringA/d85bf5ee-3578-4edd-be3e-35cacd53e5cc.def delete mode 100644 patches/98-Miscellaneous/0005-user32-Avoid-race-condition-when-unloading-module-wh.patch delete mode 100644 patches/98-Miscellaneous/46fb5f97-34cb-4b6b-ae10-7511db90ba1d.def diff --git a/README.md b/README.md index f1cdfe78..5961470a 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ Current patches include: * Support for GetVolumePathName * Implement an Arial replacement font (http://bugs.winehq.org/show_bug.cgi?id=32323) * Workaround for TransactNamedPipe not being supported (http://bugs.winehq.org/show_bug.cgi?id=17273) -* Avoid unloading modules while hook is still active (http://bugs.winehq.org/show_bug.cgi?id=22091) -* Add missing DBG_PRINTEXCEPTION_C exception in OutputDebugStringA (http://bugs.winehq.org/show_bug.cgi?id=35646) * XEMBED support for embedding Wine windows inside Linux applications * Reduced SetTimer minimum value from 15 ms to 5 ms (improves Silverlight framerates) * Lockfree algorithm for filedescriptor cache (improves file access speed) diff --git a/debian/changelog b/debian/changelog index 5a96704b..b5b65c5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,7 @@ +wine-compholio (1.7.21) UNRELEASED; urgency=low + * Remove several patches (accepted upstream). + -- Sebastian Lackner Sun, 22 Jun 2014 20:39:18 +0200 + wine-compholio (1.7.20) unstable; urgency=low * Remove several patches (accepted upstream). * Fix recommendation for odbc and add libgsm1. diff --git a/patches/14-OutputDebugStringA/0001-kernel32-Raise-DBG_PRINTEXCEPTION_C-exception-in-Out.patch b/patches/14-OutputDebugStringA/0001-kernel32-Raise-DBG_PRINTEXCEPTION_C-exception-in-Out.patch deleted file mode 100644 index d0d41533..00000000 --- a/patches/14-OutputDebugStringA/0001-kernel32-Raise-DBG_PRINTEXCEPTION_C-exception-in-Out.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 15d2a2bc4bba9653985de18e6b99f7397aa98316 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sat, 14 Jun 2014 09:39:24 +0200 -Subject: kernel32: Raise DBG_PRINTEXCEPTION_C exception in - OutputDebugStringA. - ---- - dlls/kernel32/debugger.c | 21 +++++++++++++++++++++ - dlls/ntdll/tests/exception.c | 41 +++++++++++++++++++++++++++++++++++++++++ - include/ntstatus.h | 1 + - include/winnt.h | 1 + - 4 files changed, 64 insertions(+) - -diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c -index 5300fb5..d2edfaa 100644 ---- a/dlls/kernel32/debugger.c -+++ b/dlls/kernel32/debugger.c -@@ -28,6 +28,7 @@ - #include "wine/server.h" - #include "kernel_private.h" - #include "wine/debug.h" -+#include "wine/exception.h" - - WINE_DEFAULT_DEBUG_CHANNEL(debugstr); - -@@ -227,6 +228,11 @@ BOOL WINAPI DebugActiveProcessStop( DWORD pid ) - return ret; - } - -+static LONG WINAPI debug_exception_handler( EXCEPTION_POINTERS *eptr ) -+{ -+ EXCEPTION_RECORD *rec = eptr->ExceptionRecord; -+ return (rec->ExceptionCode == DBG_PRINTEXCEPTION_C) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH; -+} - - /*********************************************************************** - * OutputDebugStringA (KERNEL32.@) -@@ -248,7 +254,22 @@ void WINAPI OutputDebugStringA( LPCSTR str ) - - if (!str) str = ""; - -+ /* raise fake exception to make copy protections happy */ -+ __TRY -+ { -+ ULONG_PTR args[2]; -+ args[0] = (ULONG_PTR)(strlen(str) + 1); -+ args[1] = (ULONG_PTR)str; -+ RaiseException( DBG_PRINTEXCEPTION_C, 0, 2, args ); -+ } -+ __EXCEPT(debug_exception_handler) -+ { -+ } -+ __ENDTRY -+ - /* send string to attached debugger */ -+ /* FIXME should only send to debugger if exception is not catched by user-mode application */ -+ - SERVER_START_REQ( output_debug_string ) - { - req->string = wine_server_client_ptr( str ); -diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c -index 8a80928..05bc15c 100644 ---- a/dlls/ntdll/tests/exception.c -+++ b/dlls/ntdll/tests/exception.c -@@ -1572,6 +1572,45 @@ static void test_dynamic_unwind(void) - - #endif /* __x86_64__ */ - -+static DWORD outputdebugstring_exceptions; -+ -+static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo) -+{ -+ PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord; -+ trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress); -+ -+ ok(rec->ExceptionCode == DBG_PRINTEXCEPTION_C, "ExceptionCode is %08x instead of %08x\n", -+ rec->ExceptionCode, DBG_PRINTEXCEPTION_C); -+ ok(rec->NumberParameters == 2, "ExceptionParameters is %d instead of 2\n", rec->NumberParameters); -+ ok(rec->ExceptionInformation[0] == 12, "ExceptionInformation[0] = %d instead of 12\n", (DWORD)rec->ExceptionInformation[0]); -+ ok(!strcmp((char *)rec->ExceptionInformation[1], "Hello World"), -+ "ExceptionInformation[1] = '%s' instead of 'Hello World'\n", (char *)rec->ExceptionInformation[1]); -+ -+ outputdebugstring_exceptions++; -+ return EXCEPTION_CONTINUE_SEARCH; -+} -+ -+static void test_outputdebugstring(void) -+{ -+ PVOID vectored_handler; -+ -+ if (!pRtlAddVectoredExceptionHandler || !pRtlRemoveVectoredExceptionHandler) -+ { -+ skip("RtlAddVectoredExceptionHandler or RtlRemoveVectoredExceptionHandler not found\n"); -+ return; -+ } -+ -+ vectored_handler = pRtlAddVectoredExceptionHandler(TRUE, &outputdebugstring_vectored_handler); -+ ok(vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n"); -+ -+ outputdebugstring_exceptions = 0; -+ OutputDebugStringA("Hello World"); -+ ok(outputdebugstring_exceptions == 1, "OutputDebugStringA generated %d exceptions, expected one\n", -+ outputdebugstring_exceptions); -+ -+ pRtlRemoveVectoredExceptionHandler(vectored_handler); -+} -+ - START_TEST(exception) - { - HMODULE hntdll = GetModuleHandleA("ntdll.dll"); -@@ -1675,5 +1714,7 @@ START_TEST(exception) - - #endif - -+ test_outputdebugstring(); -+ - VirtualFree(code_mem, 0, MEM_FREE); - } -diff --git a/include/ntstatus.h b/include/ntstatus.h -index 1eaae2d..9a7ca7a 100644 ---- a/include/ntstatus.h -+++ b/include/ntstatus.h -@@ -1211,6 +1211,7 @@ - #define DBG_TERMINATE_THREAD ((NTSTATUS) 0x40010003) - #define DBG_TERMINATE_PROCESS ((NTSTATUS) 0x40010004) - #define DBG_CONTROL_C ((NTSTATUS) 0x40010005) -+#define DBG_PRINTEXCEPTION_C ((NTSTATUS) 0x40010006) - #define DBG_CONTROL_BREAK ((NTSTATUS) 0x40010008) - #define DBG_COMMAND_EXCEPTION ((NTSTATUS) 0x40010009) - #define DBG_EXCEPTION_NOT_HANDLED ((NTSTATUS) 0x80010001) -diff --git a/include/winnt.h b/include/winnt.h -index 280cba0..e9e330d 100644 ---- a/include/winnt.h -+++ b/include/winnt.h -@@ -622,6 +622,7 @@ typedef DWORD FLONG; - #define DBG_TERMINATE_THREAD ((DWORD) 0x40010003) - #define DBG_TERMINATE_PROCESS ((DWORD) 0x40010004) - #define DBG_CONTROL_C ((DWORD) 0x40010005) -+#define DBG_PRINTEXCEPTION_C ((DWORD) 0x40010006) - #define DBG_CONTROL_BREAK ((DWORD) 0x40010008) - #define DBG_COMMAND_EXCEPTION ((DWORD) 0x40010009) - #define DBG_EXCEPTION_NOT_HANDLED ((DWORD) 0x80010001) --- -1.7.9.5 - diff --git a/patches/14-OutputDebugStringA/d85bf5ee-3578-4edd-be3e-35cacd53e5cc.def b/patches/14-OutputDebugStringA/d85bf5ee-3578-4edd-be3e-35cacd53e5cc.def deleted file mode 100644 index 8baf456a..00000000 --- a/patches/14-OutputDebugStringA/d85bf5ee-3578-4edd-be3e-35cacd53e5cc.def +++ /dev/null @@ -1,3 +0,0 @@ -Revision: 1 -Author: Sebastian Lackner -Title: Raise DBG_PRINTEXCEPTION_C exception in OutputDebugStringA. diff --git a/patches/98-Miscellaneous/0005-user32-Avoid-race-condition-when-unloading-module-wh.patch b/patches/98-Miscellaneous/0005-user32-Avoid-race-condition-when-unloading-module-wh.patch deleted file mode 100644 index 9cf0907b..00000000 --- a/patches/98-Miscellaneous/0005-user32-Avoid-race-condition-when-unloading-module-wh.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 038eae36c2d25095acafa702e27522cdb286d2a7 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Fri, 13 Jun 2014 20:35:41 +0200 -Subject: user32: Avoid race-condition when unloading module while hook is - still active. - ---- - dlls/user32/hook.c | 16 ++++++++++++---- - dlls/user32/message.c | 5 ++++- - dlls/user32/user_private.h | 2 +- - 3 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c -index 633704b..2f6b42c 100644 ---- a/dlls/user32/hook.c -+++ b/dlls/user32/hook.c -@@ -359,11 +359,13 @@ static LRESULT call_hook_proc( HOOKPROC proc, INT id, INT code, WPARAM wparam, L - * - * Retrieve the hook procedure real value for a module-relative proc - */ --void *get_hook_proc( void *proc, const WCHAR *module ) -+void *get_hook_proc( void *proc, const WCHAR *module, HMODULE *free_module ) - { - HMODULE mod; - -- if (!(mod = GetModuleHandleW(module))) -+ GetModuleHandleExW( 0, module, &mod ); -+ *free_module = mod; -+ if (!mod) - { - TRACE( "loading %s\n", debugstr_w(module) ); - /* FIXME: the library will never be freed */ -@@ -411,12 +413,13 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA - } - else if (info->proc) - { -+ HMODULE free_module = 0; - TRACE( "calling hook %p %s code %x wp %lx lp %lx module %s\n", - info->proc, hook_names[info->id-WH_MINHOOK], code, wparam, - lparam, debugstr_w(info->module) ); - - if (!info->module[0] || -- (info->proc = get_hook_proc( info->proc, info->module )) != NULL) -+ (info->proc = get_hook_proc( info->proc, info->module, &free_module )) != NULL) - { - struct user_thread_info *thread_info = get_user_thread_info(); - HHOOK prev = thread_info->hook; -@@ -428,6 +431,8 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA - info->prev_unicode, info->next_unicode ); - thread_info->hook = prev; - thread_info->hook_unicode = prev_unicode; -+ -+ if (free_module) FreeLibrary(free_module); - } - } - -@@ -897,10 +902,11 @@ void WINAPI NotifyWinEvent(DWORD event, HWND hwnd, LONG object_id, LONG child_id - WINEVENTPROC proc = info.proc; - if (proc) - { -+ HMODULE free_module = 0; - TRACE( "calling WH_WINEVENT hook %p event %x hwnd %p %x %x module %s\n", - proc, event, hwnd, object_id, child_id, debugstr_w(info.module) ); - -- if (!info.module[0] || (proc = get_hook_proc( proc, info.module )) != NULL) -+ if (!info.module[0] || (proc = get_hook_proc( proc, info.module, &free_module )) != NULL) - { - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", -@@ -914,6 +920,8 @@ void WINAPI NotifyWinEvent(DWORD event, HWND hwnd, LONG object_id, LONG child_id - DPRINTF( "%04x:Ret winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", - GetCurrentThreadId(), proc, info.handle, event, hwnd, object_id, - child_id, GetCurrentThreadId(), GetCurrentTime()); -+ -+ if (free_module) FreeLibrary(free_module); - } - } - else -diff --git a/dlls/user32/message.c b/dlls/user32/message.c -index be5d995..3167a2f 100644 ---- a/dlls/user32/message.c -+++ b/dlls/user32/message.c -@@ -2815,6 +2815,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags - if (size >= sizeof(msg_data->winevent)) - { - WINEVENTPROC hook_proc; -+ HMODULE free_module = 0; - - hook_proc = wine_server_get_ptr( msg_data->winevent.hook_proc ); - size -= sizeof(msg_data->winevent); -@@ -2825,7 +2826,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags - size = min( size, (MAX_PATH - 1) * sizeof(WCHAR) ); - memcpy( module, &msg_data->winevent + 1, size ); - module[size / sizeof(WCHAR)] = 0; -- if (!(hook_proc = get_hook_proc( hook_proc, module ))) -+ if (!(hook_proc = get_hook_proc( hook_proc, module, &free_module ))) - { - ERR( "invalid winevent hook module name %s\n", debugstr_w(module) ); - continue; -@@ -2847,6 +2848,8 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags - GetCurrentThreadId(), hook_proc, - msg_data->winevent.hook, info.msg.message, info.msg.hwnd, info.msg.wParam, - info.msg.lParam, msg_data->winevent.tid, info.msg.time); -+ -+ if (free_module) FreeLibrary(free_module); - } - continue; - case MSG_HOOK_LL: -diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h -index 2bb869a..adf3f7d 100644 ---- a/dlls/user32/user_private.h -+++ b/dlls/user32/user_private.h -@@ -225,7 +225,7 @@ extern void move_window_bits( HWND hwnd, struct window_surface *old_surface, - struct window_surface *new_surface, - const RECT *visible_rect, const RECT *old_visible_rect, - const RECT *client_rect, const RECT *valid_rects ) DECLSPEC_HIDDEN; --extern void *get_hook_proc( void *proc, const WCHAR *module ) DECLSPEC_HIDDEN; -+extern void *get_hook_proc( void *proc, const WCHAR *module, HMODULE *free_module ) DECLSPEC_HIDDEN; - extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN; - extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN; - extern DWORD get_input_codepage( void ) DECLSPEC_HIDDEN; --- -1.7.9.5 - diff --git a/patches/98-Miscellaneous/46fb5f97-34cb-4b6b-ae10-7511db90ba1d.def b/patches/98-Miscellaneous/46fb5f97-34cb-4b6b-ae10-7511db90ba1d.def deleted file mode 100644 index 313220b4..00000000 --- a/patches/98-Miscellaneous/46fb5f97-34cb-4b6b-ae10-7511db90ba1d.def +++ /dev/null @@ -1,4 +0,0 @@ -Revision: 1 -Author: Sebastian Lackner -Title: Avoid race-condition when unloading modules while hook is still active. - diff --git a/patches/patch-list.patch b/patches/patch-list.patch index fd607e30..35ff514c 100644 --- a/patches/patch-list.patch +++ b/patches/patch-list.patch @@ -6,7 +6,7 @@ diff --git a/libs/wine/config.c b/libs/wine/config.c index a273502..5fa0cd5 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c -@@ -478,6 +478,45 @@ const char *wine_get_version(void) +@@ -478,6 +478,43 @@ const char *wine_get_version(void) return PACKAGE_VERSION; } @@ -29,13 +29,11 @@ index a273502..5fa0cd5 100644 + { "3d7c4774-9e7f-11e3-9cfc-0090f5c75ad5:1", "Erich E. Hoover", "Implement missing fonts expected by Silverlight." }, + { "e7581ed7-12b3-4ed3-835b-5a62afbf9c85:4", "Sebastian Lackner", "Use lockfree implementation for get_cached_fd." }, + { "3405aa34-f341-11e3-83ce-0090f5c75ad5:1", "Erich E. Hoover", "Add default security descriptor ownership and DACLs for processes." }, -+ { "d85bf5ee-3578-4edd-be3e-35cacd53e5cc:1", "Sebastian Lackner", "Raise DBG_PRINTEXCEPTION_C exception in OutputDebugStringA." }, + { "0b21d7ac-0387-4493-aa38-fbafe3e749f5:2", "Michael Müller", "Decrease minimum SetTimer interval to 5 ms." }, + { "2394843e-2bc4-4fa4-8368-1ef32093b89e:1", "Michael Müller", "Allow changing strict draw ordering through an exported function." }, + { "255473fa-4e0a-4f51-952b-4deecc1a2181:1", "Michael Müller", "Indicate direct rendering through OpenGL extension." }, + { "59bd38b7-bbdc-4cfd-9ccd-1c72c4ed84c0:1", "Sebastian Lackner", "Implement X11DRV_FLUSH_GDI_DISPLAY ExtEscape command." }, + { "325645ba-d39d-4de4-9c94-3fe694eedaab:1", "Sebastian Lackner", "kernel32: Silence repeated CompareStringEx FIXME." }, -+ { "46fb5f97-34cb-4b6b-ae10-7511db90ba1d:1", "Sebastian Lackner", "Avoid race-condition when unloading modules while hook is still active." }, + { "acff3012-0f75-4710-9941-08b5ce4c61f3:2", "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME." }, + { "c7263660-be78-439b-979f-e745a8d87120:1", "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME." }, + { "eec5dea8-879d-417b-9f97-364deaae6576:1", "Sebastian Lackner", "Add tests for IVMRMonitorConfig." },