Added patch to avoid unloading msctf library while textservices are activated.

This commit is contained in:
Sebastian Lackner 2015-03-01 05:10:43 +01:00
parent 6cf3424356
commit 985f04d9ba
6 changed files with 112 additions and 16 deletions

View File

@ -38,12 +38,13 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
===================================
**Bugfixes and features included in the next upcoming release [14]:**
**Bugfixes and features included in the next upcoming release [15]:**
* Add stub for gdiplus.GdipCreateEffect ([Wine Bug #32163](https://bugs.winehq.org/show_bug.cgi?id=32163))
* Add support for CopyFileEx progress callback ([Wine Bug #22692](https://bugs.winehq.org/show_bug.cgi?id=22692))
* Allow to cancel a file operation via progress callback ([Wine Bug #22690](https://bugs.winehq.org/show_bug.cgi?id=22690))
* Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE. ([Wine Bug #12652](https://bugs.winehq.org/show_bug.cgi?id=12652))
* Avoid unloading msctf library while textservices are activated ([Wine Bug #31579](https://bugs.winehq.org/show_bug.cgi?id=31579))
* CPU-Z fails to start because GetLogicalProcessorInformationEx returns FALSE
* EA Origin needs support for job objects ([Wine Bug #33723](https://bugs.winehq.org/show_bug.cgi?id=33723))
* Enforce that surfaces are flushed after ReleaseDC

1
debian/changelog vendored
View File

@ -29,6 +29,7 @@ wine-staging (1.7.38) UNRELEASED; urgency=low
* Added patches to make various functions in d3d8 / ddraw hotpatchable (required for fraps).
* Added patch to make GetLogicalProcessorInformationEx a stub which returns TRUE.
* Added patches to fix race-condition when closing browseui IProcessDialog.
* Added patch to avoid unloading msctf library while textservices are activated.
* Removed patch to properly call DriverUnload when unloading device drivers (accepted upstream).
* Removed patch to allow Accept-Encoding for HTTP/1.0 in wininet (accepted upstream).
* Removed patch to declare pDirectInputCreateEx in a MSVC compatible way (accepted upstream).

View File

@ -0,0 +1,35 @@
From 4bcc72aa747a76c9300fbbd59a3c629206a7a554 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 1 Mar 2015 05:05:04 +0100
Subject: msctf: Always use interlocked functions when accessing
MSCTF_refCount.
---
dlls/msctf/msctf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c
index 78992f7..231246a 100644
--- a/dlls/msctf/msctf.c
+++ b/dlls/msctf/msctf.c
@@ -110,7 +110,7 @@ static void ClassFactory_Destructor(ClassFactory *This)
{
TRACE("Destroying class factory %p\n", This);
HeapFree(GetProcessHeap(),0,This);
- MSCTF_refCount--;
+ InterlockedDecrement(&MSCTF_refCount);
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
@@ -190,7 +190,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
This->ctor = ctor;
*ppvOut = This;
TRACE("Created class factory %p\n", This);
- MSCTF_refCount++;
+ InterlockedIncrement(&MSCTF_refCount);
return S_OK;
}
--
2.3.0

View File

@ -0,0 +1,37 @@
From f103e65ee8d05b6688dcecb4da039b1bd5714eb9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 1 Mar 2015 05:08:20 +0100
Subject: msctf: Avoid unloading library while textservices are activated.
Based on a patch by Qian Hong.
---
dlls/msctf/msctf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c
index 231246a..1582ddd 100644
--- a/dlls/msctf/msctf.c
+++ b/dlls/msctf/msctf.c
@@ -445,6 +445,7 @@ HRESULT activate_textservices(ITfThreadMgr *tm)
if (activated > 1)
return S_OK;
+ InterlockedIncrement(&MSCTF_refCount);
LIST_FOR_EACH_ENTRY(ats, &AtsList, AtsEntry, entry)
{
hr = activate_given_ts(ats->ats, tm);
@@ -462,8 +463,11 @@ HRESULT deactivate_textservices(void)
activated --;
if (activated == 0)
+ {
LIST_FOR_EACH_ENTRY(ats, &AtsList, AtsEntry, entry)
deactivate_given_ts(ats->ats);
+ InterlockedDecrement(&MSCTF_refCount);
+ }
return S_OK;
}
--
2.3.0

View File

@ -0,0 +1 @@
Fixes: [31579] Avoid unloading msctf library while textservices are activated

View File

@ -116,6 +116,7 @@ patch_enable_all ()
enable_libs_Unicode_Collation="$1"
enable_makedep_PARENTSPEC="$1"
enable_mmdevapi_AEV_Stubs="$1"
enable_msctf_DllCanUnloadNow="$1"
enable_msvcp90_basic_string_wchar_dtor="$1"
enable_msvcrt_atof_strtod="$1"
enable_msvfw32_Image_Size="$1"
@ -388,6 +389,9 @@ patch_enable ()
mmdevapi-AEV_Stubs)
enable_mmdevapi_AEV_Stubs="$2"
;;
msctf-DllCanUnloadNow)
enable_msctf_DllCanUnloadNow="$2"
;;
msvcp90-basic_string_wchar_dtor)
enable_msvcp90_basic_string_wchar_dtor="$2"
;;
@ -2566,6 +2570,23 @@ if test "$enable_mmdevapi_AEV_Stubs" -eq 1; then
) >> "$patchlist"
fi
# Patchset msctf-DllCanUnloadNow
# |
# | This patchset fixes the following Wine bugs:
# | * [#31579] Avoid unloading msctf library while textservices are activated
# |
# | Modified files:
# | * dlls/msctf/msctf.c
# |
if test "$enable_msctf_DllCanUnloadNow" -eq 1; then
patch_apply msctf-DllCanUnloadNow/0001-msctf-Always-use-interlocked-functions-when-accessin.patch
patch_apply msctf-DllCanUnloadNow/0002-msctf-Avoid-unloading-library-while-textservices-are.patch
(
echo '+ { "Sebastian Lackner", "msctf: Always use interlocked functions when accessing MSCTF_refCount.", 1 },';
echo '+ { "Sebastian Lackner", "msctf: Avoid unloading library while textservices are activated.", 1 },';
) >> "$patchlist"
fi
# Patchset msvcp90-basic_string_wchar_dtor
# |
# | This patchset fixes the following Wine bugs:
@ -3376,21 +3397,6 @@ if test "$enable_server_CreateProcess_ACLs" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-OpenProcess
# |
# | This patchset fixes the following Wine bugs:
# | * [#37087] Return an error when trying to open a terminated process
# |
# | Modified files:
# | * server/process.c, server/process.h
# |
if test "$enable_server_OpenProcess" -eq 1; then
patch_apply server-OpenProcess/0001-server-Return-error-when-opening-a-terminating-proce.patch
(
echo '+ { "Michael Müller", "server: Return error when opening a terminating process.", 3 },';
) >> "$patchlist"
fi
# Patchset server-Misc_ACL
# |
# | This patchset fixes the following Wine bugs:
@ -3408,6 +3414,21 @@ if test "$enable_server_Misc_ACL" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-OpenProcess
# |
# | This patchset fixes the following Wine bugs:
# | * [#37087] Return an error when trying to open a terminated process
# |
# | Modified files:
# | * server/process.c, server/process.h
# |
if test "$enable_server_OpenProcess" -eq 1; then
patch_apply server-OpenProcess/0001-server-Return-error-when-opening-a-terminating-proce.patch
(
echo '+ { "Michael Müller", "server: Return error when opening a terminating process.", 3 },';
) >> "$patchlist"
fi
# Patchset server-JobObjects
# |
# | This patchset fixes the following Wine bugs: