Rebase against 3a6ac6055511b14a7e26ba0200f36da418f80723.

This commit is contained in:
Sebastian Lackner 2015-11-25 20:59:04 +01:00
parent a990060062
commit 67b1817720
7 changed files with 14 additions and 263 deletions

View File

@ -34,7 +34,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features in Wine Staging 1.8-rc2 [267]:**
**Bug fixes and features in Wine Staging 1.8-rc2 [266]:**
*Note: The following list only contains features and bug fixes which are not
yet available in vanilla Wine. They are removed from the list as soon as they
@ -128,7 +128,6 @@ for more details.*
* Exception during start of fr-043 caused by missing DXTn support ([Wine Bug #37391](https://bugs.winehq.org/show_bug.cgi?id=37391))
* Export additional OpenAL32 functions ([Wine Bug #38972](https://bugs.winehq.org/show_bug.cgi?id=38972))
* Expose PKEY_AudioEndpoint_PhysicalSpeakers device property in PulseAudio driver
* FEAR 1 installer expects basic_string_wchar_dtor to return NULL ([Wine Bug #37358](https://bugs.winehq.org/show_bug.cgi?id=37358))
* Fake success in IViewObject::Draw stub ([Wine Bug #30611](https://bugs.winehq.org/show_bug.cgi?id=30611))
* Fake success in kernel32.SetFileCompletionNotificationModes ([Wine Bug #38960](https://bugs.winehq.org/show_bug.cgi?id=38960))
* Fallback to default comspec when %COMSPEC% is not set

View File

@ -1,65 +0,0 @@
From b4db8b5c0ed023c05792ebfe6aef07edb7fb4327 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 9 Oct 2014 17:32:58 +0200
Subject: msvcp90: basic_string_wchar_dtor needs to return NULL
---
dlls/msvcp90/msvcp90.h | 4 ++--
dlls/msvcp90/string.c | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h
index 17d582c..dc71a74 100644
--- a/dlls/msvcp90/msvcp90.h
+++ b/dlls/msvcp90/msvcp90.h
@@ -94,7 +94,7 @@ basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t);
basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
-void __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
+void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
@@ -123,7 +123,7 @@ typedef struct
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t);
-void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
+void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c
index 3afb375..86b4f8e 100644
--- a/dlls/msvcp90/string.c
+++ b/dlls/msvcp90/string.c
@@ -973,10 +973,11 @@ basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ptr_ptr(basic_string_
/* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
/* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4)
-void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
+void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
{
TRACE("%p\n", this);
basic_string_char_tidy(this, TRUE, 0);
+ return NULL;
}
/* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
@@ -2712,10 +2713,11 @@ basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ptr_ptr(basic_strin
/* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
/* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4)
-void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
+void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
{
TRACE("%p\n", this);
basic_string_wchar_tidy(this, TRUE, 0);
+ return NULL;
}
/* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
--
2.3.7

View File

@ -1,158 +0,0 @@
From 98cd419f1bea2a0002ff4d768680862e88bdcad0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 9 Oct 2014 17:35:50 +0200
Subject: msvcp90/tests: Add tests to check that basic_string_wchar_dtor
returns NULL.
---
dlls/msvcp90/tests/string.c | 90 +++++++++++++++++++++++++++++++--------------
1 file changed, 62 insertions(+), 28 deletions(-)
diff --git a/dlls/msvcp90/tests/string.c b/dlls/msvcp90/tests/string.c
index f1aa92a..68a432f 100644
--- a/dlls/msvcp90/tests/string.c
+++ b/dlls/msvcp90/tests/string.c
@@ -63,7 +63,7 @@ static basic_string_char* (__cdecl *p_basic_string_char_concatenate_cstr)(basic_
static basic_string_char* (__thiscall *p_basic_string_char_ctor)(basic_string_char*);
static basic_string_char* (__thiscall *p_basic_string_char_copy_ctor)(basic_string_char*, basic_string_char*);
static basic_string_char* (__thiscall *p_basic_string_char_ctor_cstr)(basic_string_char*, const char*);
-static void (__thiscall *p_basic_string_char_dtor)(basic_string_char*);
+static void* (__thiscall *p_basic_string_char_dtor)(basic_string_char*);
static basic_string_char* (__thiscall *p_basic_string_char_erase)(basic_string_char*, size_t, size_t);
static basic_string_char* (__thiscall *p_basic_string_char_assign_cstr_len)(basic_string_char*, const char*, size_t);
static const char* (__thiscall *p_basic_string_char_cstr)(basic_string_char*);
@@ -85,7 +85,7 @@ static size_t *p_basic_string_char_npos;
static basic_string_wchar* (__thiscall *p_basic_string_wchar_ctor)(basic_string_wchar*);
static basic_string_wchar* (__thiscall *p_basic_string_wchar_copy_ctor)(basic_string_wchar*, basic_string_wchar*);
static basic_string_wchar* (__thiscall *p_basic_string_wchar_ctor_cstr)(basic_string_wchar*, const wchar_t*);
-static void (__thiscall *p_basic_string_wchar_dtor)(basic_string_wchar*);
+static void* (__thiscall *p_basic_string_wchar_dtor)(basic_string_wchar*);
static basic_string_wchar* (__thiscall *p_basic_string_wchar_erase)(basic_string_wchar*, size_t, size_t);
static basic_string_wchar* (__thiscall *p_basic_string_wchar_assign_cstr_len)(basic_string_wchar*, const wchar_t*, size_t);
static const wchar_t* (__thiscall *p_basic_string_wchar_cstr)(basic_string_wchar*);
@@ -113,32 +113,35 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression,
#include "pshpack1.h"
struct thiscall_thunk
{
- BYTE pop_eax; /* popl %eax (ret addr) */
- BYTE pop_edx; /* popl %edx (func) */
- BYTE pop_ecx; /* popl %ecx (this) */
- BYTE push_eax; /* pushl %eax */
- WORD jmp_edx; /* jmp *%edx */
+ BYTE pop_ecx; /* popl %ecx (ret addr) */
+ BYTE pop_edx; /* popl %edx (func) */
+ BYTE pop_eax; /* popl %eax (eax value) */
+ BYTE xchg_ecx_esp[3]; /* xchg %ecx, *%esp (this <-> ret addr) */
+ WORD jmp_edx; /* jmp *%edx */
};
#include "poppack.h"
-static void * (WINAPI *call_thiscall_func1)( void *func, void *this );
-static void * (WINAPI *call_thiscall_func2)( void *func, void *this, const void *a );
-static void * (WINAPI *call_thiscall_func3)( void *func, void *this, const void *a, const void *b );
-static void * (WINAPI *call_thiscall_func4)( void *func, void *this, const void *a, const void *b,
- const void *c );
-static void * (WINAPI *call_thiscall_func5)( void *func, void *this, const void *a, const void *b,
- const void *c, const void *d );
-static void * (WINAPI *call_thiscall_func6)( void *func, void *this, const void *a, const void *b,
- const void *c, const void *d, const void *e );
+static void * (WINAPI *call_thiscall_func1)( void *func, unsigned int eax, void *this);
+static void * (WINAPI *call_thiscall_func2)( void *func, unsigned int eax, void *this, const void *a );
+static void * (WINAPI *call_thiscall_func3)( void *func, unsigned int eax, void *this, const void *a,
+ const void *b );
+static void * (WINAPI *call_thiscall_func4)( void *func, unsigned int eax, void *this, const void *a,
+ const void *b, const void *c );
+static void * (WINAPI *call_thiscall_func5)( void *func, unsigned int eax, void *this, const void *a,
+ const void *b, const void *c, const void *d );
+static void * (WINAPI *call_thiscall_func6)( void *func, unsigned int eax, void *this, const void *a,
+ const void *b, const void *c, const void *d, const void *e );
static void init_thiscall_thunk(void)
{
struct thiscall_thunk *thunk = VirtualAlloc( NULL, sizeof(*thunk),
MEM_COMMIT, PAGE_EXECUTE_READWRITE );
- thunk->pop_eax = 0x58; /* popl %eax */
- thunk->pop_edx = 0x5a; /* popl %edx */
thunk->pop_ecx = 0x59; /* popl %ecx */
- thunk->push_eax = 0x50; /* pushl %eax */
+ thunk->pop_edx = 0x5a; /* popl %edx */
+ thunk->pop_eax = 0x58; /* popl %eax */
+ thunk->xchg_ecx_esp[0] = 0x87; /* xchg %ecx, *%esp */
+ thunk->xchg_ecx_esp[1] = 0x0c;
+ thunk->xchg_ecx_esp[2] = 0x24;
thunk->jmp_edx = 0xe2ff; /* jmp *%edx */
call_thiscall_func1 = (void *)thunk;
call_thiscall_func2 = (void *)thunk;
@@ -148,15 +151,16 @@ static void init_thiscall_thunk(void)
call_thiscall_func6 = (void *)thunk;
}
-#define call_func1(func,_this) call_thiscall_func1(func,_this)
-#define call_func2(func,_this,a) call_thiscall_func2(func,_this,(const void*)a)
-#define call_func3(func,_this,a,b) call_thiscall_func3(func,_this,(const void*)a,(const void*)b)
-#define call_func4(func,_this,a,b,c) call_thiscall_func4(func,_this,(const void*)a,\
- (const void*)b,(const void*)c)
-#define call_func5(func,_this,a,b,c,d) call_thiscall_func5(func,_this,(const void*)a,\
- (const void*)b,(const void*)c,(const void*)d)
-#define call_func6(func,_this,a,b,c,d,e) call_thiscall_func6(func,_this,(const void*)a,\
- (const void*)b,(const void*)c,(const void*)d,(const void*)e)
+#define call_func1(func,_this) call_thiscall_func1(func,0,_this)
+#define call_func2(func,_this,a) call_thiscall_func2(func,0,_this,(const void*)a)
+#define call_func3(func,_this,a,b) call_thiscall_func3(func,0,_this,(const void*)a,(const void*)b)
+#define call_func4(func,_this,a,b,c) call_thiscall_func4(func,0,_this,(const void*)a,\
+ (const void*)b,(const void*)c)
+#define call_func5(func,_this,a,b,c,d) call_thiscall_func5(func,0,_this,(const void*)a,\
+ (const void*)b,(const void*)c,(const void*)d)
+#define call_func6(func,_this,a,b,c,d,e) call_thiscall_func6(func,0,_this,(const void*)a,\
+ (const void*)b,(const void*)c,(const void*)d,(const void*)e)
+#define call_func1_eax(func,eax,_this) call_thiscall_func1(func,eax,_this)
#else
@@ -767,6 +771,35 @@ static void test_basic_string_char_find_last_not_of(void) {
}
}
+static void test_basic_string_dtor_eax(void) {
+#ifdef __i386__
+ basic_string_wchar str1;
+ basic_string_char str2;
+ void *ret;
+ wchar_t wtmp1[32];
+
+ mbstowcs(wtmp1, "qwerty", 32);
+
+ /* eax = 0x1337 */
+ call_func2(p_basic_string_wchar_ctor_cstr, &str1, wtmp1);
+ ret = call_func1_eax(p_basic_string_wchar_dtor, 0x1337, &str1);
+ ok(ret == (void *)0x0, "Expected eax value 0x%x, got 0x%x\n", 0x0, (unsigned int)ret);
+
+ call_func2(p_basic_string_char_ctor_cstr, &str2, "qwerty");
+ ret = call_func1_eax(p_basic_string_char_dtor, 0x1337, &str2);
+ ok(ret == (void *)0x0, "Expected eax value 0x%x, got 0x%x\n", 0x0, (unsigned int)ret);
+
+ /* eax = 0xdeadbeef */
+ call_func2(p_basic_string_wchar_ctor_cstr, &str1, wtmp1);
+ ret = call_func1_eax(p_basic_string_wchar_dtor, 0xdeadbeef, &str1);
+ ok(ret == (void *)0x0, "Expected eax value 0x%x, got 0x%x\n", 0x0, (unsigned int)ret);
+
+ call_func2(p_basic_string_char_ctor_cstr, &str2, "qwerty");
+ ret = call_func1_eax(p_basic_string_char_dtor, 0xdeadbeef, &str2);
+ ok(ret == (void *)0x0, "Expected eax value 0x%x, got 0x%x\n", 0x0, (unsigned int)ret);
+#endif
+}
+
START_TEST(string)
{
if(!init())
@@ -783,6 +816,7 @@ START_TEST(string)
test_basic_string_wchar();
test_basic_string_wchar_swap();
test_basic_string_char_find_last_not_of();
+ test_basic_string_dtor_eax();
ok(!invalid_parameter, "invalid_parameter_handler was invoked too many times\n");
--
2.3.7

View File

@ -1,2 +0,0 @@
Fixes: [37358] FEAR 1 installer expects basic_string_wchar_dtor to return NULL
Category: stable

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "1d19eb15d4abfdd14dccc5ac05b83c0ee1a1ace1"
echo "3a6ac6055511b14a7e26ba0200f36da418f80723"
}
# Show version information
@ -178,7 +178,6 @@ patch_enable_all ()
enable_msctf_ITfThreadMgrEx_ActivateEx="$1"
enable_mshtml_HTMLLocation_put_hash="$1"
enable_msidb_Implementation="$1"
enable_msvcp90_basic_string_dtor="$1"
enable_msvcrt_Math_Precision="$1"
enable_msvcrt_StdHandle_RefCount="$1"
enable_ntdll_APC_Performance="$1"
@ -644,9 +643,6 @@ patch_enable ()
msidb-Implementation)
enable_msidb_Implementation="$2"
;;
msvcp90-basic_string_dtor)
enable_msvcp90_basic_string_dtor="$2"
;;
msvcrt-Math_Precision)
enable_msvcrt_Math_Precision="$2"
;;
@ -1570,9 +1566,6 @@ if test "$enable_category_stable" -eq 1; then
if test "$enable_mscoree_CorValidateImage" -gt 1; then
abort "Patchset mscoree-CorValidateImage disabled, but category-stable depends on that."
fi
if test "$enable_msvcp90_basic_string_dtor" -gt 1; then
abort "Patchset msvcp90-basic_string_dtor disabled, but category-stable depends on that."
fi
if test "$enable_ntdll_APC_Start_Process" -gt 1; then
abort "Patchset ntdll-APC_Start_Process disabled, but category-stable depends on that."
fi
@ -1723,7 +1716,6 @@ if test "$enable_category_stable" -eq 1; then
enable_mfplat_MFTRegister=1
enable_mountmgr_DosDevices=1
enable_mscoree_CorValidateImage=1
enable_msvcp90_basic_string_dtor=1
enable_ntdll_APC_Start_Process=1
enable_ntdll_CLI_Images=1
enable_ntdll_DOS_Attributes=1
@ -3878,23 +3870,6 @@ if test "$enable_msidb_Implementation" -eq 1; then
) >> "$patchlist"
fi
# Patchset msvcp90-basic_string_dtor
# |
# | This patchset fixes the following Wine bugs:
# | * [#37358] FEAR 1 installer expects basic_string_wchar_dtor to return NULL
# |
# | Modified files:
# | * dlls/msvcp90/msvcp90.h, dlls/msvcp90/string.c, dlls/msvcp90/tests/string.c
# |
if test "$enable_msvcp90_basic_string_dtor" -eq 1; then
patch_apply msvcp90-basic_string_dtor/0001-msvcp90-basic_string_wchar_dtor-needs-to-return-NULL.patch
patch_apply msvcp90-basic_string_dtor/0002-msvcp90-tests-Add-tests-to-check-that-basic_string_w.patch
(
echo '+ { "Michael Müller", "msvcp90: Basic_string_wchar_dtor needs to return NULL.", 1 },';
echo '+ { "Michael Müller", "msvcp90/tests: Add tests to check that basic_string_wchar_dtor returns NULL.", 1 },';
) >> "$patchlist"
fi
# Patchset msvcrt-Math_Precision
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,4 +1,4 @@
From cacb40ffeaf3d0c09d5d78479a1b93b3f7434240 Mon Sep 17 00:00:00 2001
From 223fb2bc4c744188440690b7a95c5a2cc0f28ef6 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Nov 2015 02:57:56 +0100
Subject: winepulse.drv: Use a separate mainloop and ctx for
@ -9,10 +9,10 @@ Subject: winepulse.drv: Use a separate mainloop and ctx for
1 file changed, 26 insertions(+), 31 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index b2f83c8..36822a4 100644
index 24972ab..e781dbe 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -363,7 +363,7 @@ static DWORD pulse_channel_map_to_channel_mask(const pa_channel_map *map) {
@@ -365,7 +365,7 @@ static DWORD pulse_channel_map_to_channel_mask(const pa_channel_map *map) {
return mask;
}
@ -21,7 +21,7 @@ index b2f83c8..36822a4 100644
WAVEFORMATEX *wfx = &fmt->Format;
pa_stream *stream;
pa_channel_map map;
@@ -382,7 +382,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -384,7 +384,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
attr.minreq = attr.fragsize = pa_frame_size(&ss);
attr.prebuf = 0;
@ -30,7 +30,7 @@ index b2f83c8..36822a4 100644
if (stream)
pa_stream_set_state_callback(stream, pulse_stream_state, NULL);
if (!stream)
@@ -393,7 +393,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -395,7 +395,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
else
ret = pa_stream_connect_record(stream, NULL, &attr, PA_STREAM_START_CORKED|PA_STREAM_FIX_RATE|PA_STREAM_FIX_CHANNELS|PA_STREAM_EARLY_REQUESTS);
if (ret >= 0) {
@ -39,7 +39,7 @@ index b2f83c8..36822a4 100644
pa_stream_get_state(stream) == PA_STREAM_CREATING)
{}
if (pa_stream_get_state(stream) == PA_STREAM_READY) {
@@ -404,7 +404,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -406,7 +406,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
else
length = pa_stream_get_buffer_attr(stream)->fragsize;
pa_stream_disconnect(stream);
@ -48,8 +48,8 @@ index b2f83c8..36822a4 100644
pa_stream_get_state(stream) == PA_STREAM_READY)
{}
}
@@ -522,10 +522,12 @@ static HRESULT pulse_test_connect(void)
WCHAR path[PATH_MAX], *name;
@@ -524,10 +524,12 @@ static HRESULT pulse_test_connect(void)
WCHAR path[MAX_PATH], *name;
char *str;
pa_operation *o;
+ pa_mainloop *ml;
@ -63,7 +63,7 @@ index b2f83c8..36822a4 100644
GetModuleFileNameW(NULL, path, sizeof(path)/sizeof(*path));
name = strrchrW(path, '\\');
@@ -537,24 +539,23 @@ static HRESULT pulse_test_connect(void)
@@ -539,24 +541,23 @@ static HRESULT pulse_test_connect(void)
str = pa_xmalloc(len);
WideCharToMultiByte(CP_UNIXCP, 0, name, -1, str, len, NULL, NULL);
TRACE("Name: %s\n", str);
@ -96,7 +96,7 @@ index b2f83c8..36822a4 100644
if (state == PA_CONTEXT_FAILED || state == PA_CONTEXT_TERMINATED)
goto fail;
@@ -564,34 +565,28 @@ static HRESULT pulse_test_connect(void)
@@ -566,34 +567,28 @@ static HRESULT pulse_test_connect(void)
}
TRACE("Test-connected to server %s with protocol version: %i.\n",

View File

@ -1,6 +1,8 @@
wine-staging (1.8~rc2) unstable; urgency=low
* Removed patch to revert "prepare GLresources before calling
context_apply_fbo_state" commit.
* Removed patch to set EAX to 0 in Basic_string_wchar_dtor (accepted
upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Wed, 25 Nov 2015 20:21:46 +0100
wine-staging (1.8~rc1) unstable; urgency=low