winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1016 discussions
Start a n
N
ew thread
Nikolay Sivov : ole32: Improve locking safety in IMalloc::HeapMinimize().
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: 1039a7756271b742419eeaf34a895d14dacd8a4c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1039a7756271b742419eeaf3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Apr 20 10:59:20 2020 +0300 ole32: Improve locking safety in IMalloc::HeapMinimize(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/ifs.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index f1dae0c956..96977fc751 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -363,17 +363,22 @@ static INT WINAPI IMalloc_fnDidAlloc(IMalloc *iface, void *mem) */ static void WINAPI IMalloc_fnHeapMinimize(IMalloc *iface) { - TRACE("()\n"); + BOOL spy_active = FALSE; - if(Malloc32.pSpy) { - EnterCriticalSection(&IMalloc32_SpyCS); - IMallocSpy_PreHeapMinimize(Malloc32.pSpy); - } + TRACE("()\n"); - if(Malloc32.pSpy) { - IMallocSpy_PostHeapMinimize(Malloc32.pSpy); - LeaveCriticalSection(&IMalloc32_SpyCS); - } + if (Malloc32.pSpy) + { + EnterCriticalSection(&IMalloc32_SpyCS); + spy_active = TRUE; + IMallocSpy_PreHeapMinimize(Malloc32.pSpy); + } + + if (spy_active) + { + IMallocSpy_PostHeapMinimize(Malloc32.pSpy); + LeaveCriticalSection(&IMalloc32_SpyCS); + } } static const IMallocVtbl VT_IMalloc32 =
1
0
0
0
Dmitry Timoshkov : wldap32/tests: Add a test for LDAP paged search.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: 82bcbcc54999cd7b8a957a3925ae9491b8be3191 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=82bcbcc54999cd7b8a957a39…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Apr 20 13:59:35 2020 +0800 wldap32/tests: Add a test for LDAP paged search. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wldap32/tests/parse.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c index 5a49b9c69d..2915d9c02b 100644 --- a/dlls/wldap32/tests/parse.c +++ b/dlls/wldap32/tests/parse.c @@ -212,10 +212,72 @@ static void test_ldap_server_control( void ) ldap_unbind( ld ); } +static void test_ldap_paged_search(void) +{ + LDAP *ld; + ULONG ret, count; + int version; + LDAPSearch *search; + LDAPMessage *res, *entry; + BerElement *ber; + WCHAR *attr; + + ld = ldap_initA( (char *)"
ldap.forumsys.com
", 389 ); + ok( ld != NULL, "ldap_init failed\n" ); + + version = LDAP_VERSION3; + ret = ldap_set_optionW( ld, LDAP_OPT_PROTOCOL_VERSION, &version ); + if (ret == LDAP_SERVER_DOWN || ret == LDAP_UNAVAILABLE) + { + skip( "test server can't be reached\n" ); + ldap_unbind( ld ); + return; + } + + search = ldap_search_init_pageW( ld, (WCHAR *)L"", LDAP_SCOPE_BASE, (WCHAR *)L"(objectclass=*)", + NULL, FALSE, NULL, NULL, 0, 0, NULL); + ok( search != NULL, "ldap_search_init_page failed\n" ); + + count = 0xdeadbeef; + res = NULL; + ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res ); + ok( !ret, "ldap_get_next_page_s failed 0x%x\n", ret ); + ok( res != NULL, "expected res != NULL\n" ); + ok( count == 0, "got %u\n", count ); + + count = ldap_count_entries( ld, res); + ok( count == 1, "got %u\n", count ); + + entry = ldap_first_entry( ld, res); + ok( res != NULL, "expected entry != NULL\n" ); + + attr = ldap_first_attributeW( ld, entry, &ber ); + ok( !wcscmp( attr, L"objectClass" ), "got %s\n", wine_dbgstr_w( attr ) ); + ldap_memfreeW( attr ); + attr = ldap_next_attributeW( ld, entry, ber ); + ok( !attr, "got %s\n", wine_dbgstr_w( attr )); + + ber_free(ber, 0); + ldap_msgfree( res ); + + count = 0xdeadbeef; + res = (void *)0xdeadbeef; + ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res ); + ok( ret == LDAP_NO_RESULTS_RETURNED, "got 0x%x\n", ret ); +todo_wine + ok( !res, "expected res == NULL\n" ); +todo_wine + ok( count == 0, "got %u\n", count ); + + ldap_search_abandon_page( ld, search ); + ldap_unbind( ld ); +} + START_TEST (parse) { LDAP *ld; + test_ldap_paged_search(); test_ldap_server_control(); test_ldap_bind_sA();
1
0
0
0
Vincent Povirk : mscoree: Use mono_get_corlib to get mscorlib image.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: 049e50bcaa0719c6730346d1556f434549a0f3ef URL:
https://source.winehq.org/git/wine.git/?a=commit;h=049e50bcaa0719c6730346d1…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sat Apr 18 22:01:15 2020 -0500 mscoree: Use mono_get_corlib to get mscorlib image. Apparently, mono_domain_assembly_open is intended for the entry point assembly only, and no longer works when mscorlib is passed in. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscoree/corruntimehost.c | 39 +++++++++++++++++++++++---------------- dlls/mscoree/metahost.c | 2 ++ dlls/mscoree/mscoree_private.h | 1 + 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index 7eb4385494..c79c4fd8d1 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -200,18 +200,25 @@ static BOOL RuntimeHost_GetMethod(MonoDomain *domain, const char *assemblyname, MonoImage *image; MonoClass *klass; - assembly = mono_domain_assembly_open(domain, assemblyname); - if (!assembly) + if (!assemblyname) { - ERR("Cannot load assembly %s\n", assemblyname); - return FALSE; + image = mono_get_corlib(); } - - image = mono_assembly_get_image(assembly); - if (!image) + else { - ERR("Couldn't get assembly image for %s\n", assemblyname); - return FALSE; + assembly = mono_domain_assembly_open(domain, assemblyname); + if (!assembly) + { + ERR("Cannot load assembly %s\n", assemblyname); + return FALSE; + } + + image = mono_assembly_get_image(assembly); + if (!image) + { + ERR("Couldn't get assembly image for %s\n", assemblyname); + return FALSE; + } } klass = mono_class_from_name(image, namespace, typename); @@ -250,7 +257,7 @@ static HRESULT RuntimeHost_DoInvoke(RuntimeHost *This, MonoDomain *domain, if (methodname != get_hresult) { /* Map the exception to an HRESULT. */ - hr = RuntimeHost_Invoke(This, domain, "mscorlib", "System", "Exception", get_hresult, + hr = RuntimeHost_Invoke(This, domain, NULL, "System", "Exception", get_hresult, exc, NULL, 0, &hr_object); if (SUCCEEDED(hr)) hr = *(HRESULT*)mono_object_unbox(hr_object); @@ -348,7 +355,7 @@ static HRESULT RuntimeHost_GetObjectForIUnknown(RuntimeHost *This, MonoDomain *d MonoObject *result; args[0] = &unk; - hr = RuntimeHost_Invoke(This, domain, "mscorlib", "System.Runtime.InteropServices", "Marshal", "GetObjectForIUnknown", + hr = RuntimeHost_Invoke(This, domain, NULL, "System.Runtime.InteropServices", "Marshal", "GetObjectForIUnknown", NULL, args, 1, &result); if (SUCCEEDED(hr)) @@ -413,7 +420,7 @@ static HRESULT RuntimeHost_AddDomain(RuntimeHost *This, const WCHAR *name, IUnkn args[2] = NULL; } - res = RuntimeHost_Invoke(This, domain, "mscorlib", "System", "AppDomain", "CreateDomain", + res = RuntimeHost_Invoke(This, domain, NULL, "System", "AppDomain", "CreateDomain", NULL, args, 3, &new_domain); if (FAILED(res)) @@ -427,7 +434,7 @@ static HRESULT RuntimeHost_AddDomain(RuntimeHost *This, const WCHAR *name, IUnkn * Instead, do a vcall. */ - res = RuntimeHost_VirtualInvoke(This, domain, "mscorlib", "System", "AppDomain", "get_Id", + res = RuntimeHost_VirtualInvoke(This, domain, NULL, "System", "AppDomain", "get_Id", new_domain, NULL, 0, &id); if (FAILED(res)) @@ -448,7 +455,7 @@ static HRESULT RuntimeHost_GetIUnknownForDomain(RuntimeHost *This, MonoDomain *d MonoObject *appdomain_object; IUnknown *unk; - hr = RuntimeHost_Invoke(This, domain, "mscorlib", "System", "AppDomain", "get_CurrentDomain", + hr = RuntimeHost_Invoke(This, domain, NULL, "System", "AppDomain", "get_CurrentDomain", NULL, NULL, 0, &appdomain_object); if (SUCCEEDED(hr)) @@ -480,7 +487,7 @@ void RuntimeHost_ExitProcess(RuntimeHost *This, INT exitcode) args[0] = &exitcode; args[1] = NULL; - RuntimeHost_Invoke(This, domain, "mscorlib", "System", "Environment", "Exit", + RuntimeHost_Invoke(This, domain, NULL, "System", "Environment", "Exit", NULL, args, 1, &dummy); ERR("Process should have exited\n"); @@ -1048,7 +1055,7 @@ HRESULT RuntimeHost_GetIUnknownForObject(RuntimeHost *This, MonoObject *obj, domain = mono_object_get_domain(obj); - hr = RuntimeHost_Invoke(This, domain, "mscorlib", "System.Runtime.InteropServices", "Marshal", "GetIUnknownForObject", + hr = RuntimeHost_Invoke(This, domain, NULL, "System.Runtime.InteropServices", "Marshal", "GetIUnknownForObject", NULL, (void**)&obj, 1, &result); if (SUCCEEDED(hr)) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index df01f9b77f..9fa7978340 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -99,6 +99,7 @@ MonoDomain* (CDECL *mono_domain_get_by_id)(int id); BOOL (CDECL *mono_domain_set)(MonoDomain *domain,BOOL force); void (CDECL *mono_domain_set_config)(MonoDomain *domain,const char *base_dir,const char *config_file_name); static void (CDECL *mono_free)(void *); +MonoImage* (CDECL *mono_get_corlib)(void); static MonoImage* (CDECL *mono_image_open)(const char *fname, MonoImageOpenStatus *status); MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status); static void (CDECL *mono_install_assembly_preload_hook)(MonoAssemblyPreLoadFunc func, void *user_data); @@ -204,6 +205,7 @@ static HRESULT load_mono(LPCWSTR mono_path) LOAD_MONO_FUNCTION(mono_domain_set); LOAD_MONO_FUNCTION(mono_domain_set_config); LOAD_MONO_FUNCTION(mono_free); + LOAD_MONO_FUNCTION(mono_get_corlib); LOAD_MONO_FUNCTION(mono_image_open); LOAD_MONO_FUNCTION(mono_install_assembly_preload_hook); LOAD_MONO_FUNCTION(mono_jit_exec); diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index 5b6c398761..8ad95e385e 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -162,6 +162,7 @@ extern MonoDomain* (CDECL *mono_domain_get)(void) DECLSPEC_HIDDEN; extern MonoDomain* (CDECL *mono_domain_get_by_id)(int id) DECLSPEC_HIDDEN; extern BOOL (CDECL *mono_domain_set)(MonoDomain *domain, BOOL force) DECLSPEC_HIDDEN; extern void (CDECL *mono_domain_set_config)(MonoDomain *domain,const char *base_dir,const char *config_file_name) DECLSPEC_HIDDEN; +extern MonoImage* (CDECL *mono_get_corlib)(void) DECLSPEC_HIDDEN; extern int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]) DECLSPEC_HIDDEN; extern MonoDomain* (CDECL *mono_jit_init_version)(const char *domain_name, const char *runtime_version) DECLSPEC_HIDDEN; extern MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : ntdll: Leave critical section before blocking in RtlWaitOnAddress.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: eaad2380003777fa3036d9e7286f02d82a15064a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eaad2380003777fa3036d9e7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 20 00:02:29 2020 +0200 ntdll: Leave critical section before blocking in RtlWaitOnAddress. Fixes regression from commit 4f673d5386f44d4af4459a95b3059cfb887db8c9. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/exception.c | 4 ++-- dlls/ntdll/ntdll_misc.h | 2 +- dlls/ntdll/server.c | 9 +++++++-- dlls/ntdll/sync.c | 4 +--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c index 87341654ba..5df037b7ea 100644 --- a/dlls/ntdll/exception.c +++ b/dlls/ntdll/exception.c @@ -114,7 +114,7 @@ void wait_suspend( CONTEXT *context ) int saved_errno = errno; /* wait with 0 timeout, will only return once the thread is no longer suspended */ - server_select( NULL, 0, SELECT_INTERRUPTIBLE, 0, context, NULL ); + server_select( NULL, 0, SELECT_INTERRUPTIBLE, 0, context, NULL, NULL ); errno = saved_errno; } @@ -159,7 +159,7 @@ NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, int first_chance, CONTEXT *con { select_op.wait.op = SELECT_WAIT; select_op.wait.handles[0] = handle; - server_select( &select_op, offsetof( select_op_t, wait.handles[1] ), SELECT_INTERRUPTIBLE, TIMEOUT_INFINITE, &exception_context, NULL ); + server_select( &select_op, offsetof( select_op_t, wait.handles[1] ), SELECT_INTERRUPTIBLE, TIMEOUT_INFINITE, &exception_context, NULL, NULL ); SERVER_START_REQ( get_exception_status ) { diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 964953e27d..eaed3cc1fc 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -117,7 +117,7 @@ extern unsigned int server_call_unlocked( void *req_ptr ) DECLSPEC_HIDDEN; extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN; extern void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN; extern unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags, - timeout_t abs_timeout, CONTEXT *context, user_apc_t *user_apc ) DECLSPEC_HIDDEN; + timeout_t abs_timeout, CONTEXT *context, RTL_CRITICAL_SECTION *cs, user_apc_t *user_apc ) DECLSPEC_HIDDEN; extern unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT flags, const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN; extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index 3de5a93556..c0dd0f35fc 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -602,7 +602,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result ) * server_select */ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags, - timeout_t abs_timeout, CONTEXT *context, user_apc_t *user_apc ) + timeout_t abs_timeout, CONTEXT *context, RTL_CRITICAL_SECTION *cs, user_apc_t *user_apc ) { unsigned int ret; int cookie; @@ -660,6 +660,11 @@ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT size = offsetof( select_op_t, signal_and_wait.signal ); } pthread_sigmask( SIG_SETMASK, &old_set, NULL ); + if (cs) + { + RtlLeaveCriticalSection( cs ); + cs = NULL; + } if (ret != STATUS_PENDING) break; ret = wait_select_reply( &cookie ); @@ -692,7 +697,7 @@ unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT f for (;;) { - ret = server_select( select_op, size, flags, abs_timeout, NULL, &apc ); + ret = server_select( select_op, size, flags, abs_timeout, NULL, NULL, &apc ); if (ret != STATUS_USER_APC) break; invoke_apc( &apc ); diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index d3927a05af..fbfb8f893e 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -2584,9 +2584,7 @@ NTSTATUS WINAPI RtlWaitOnAddress( const void *addr, const void *cmp, SIZE_T size select_op.keyed_event.handle = wine_server_obj_handle( keyed_event ); select_op.keyed_event.key = wine_server_client_ptr( addr ); - ret = server_select( &select_op, sizeof(select_op.keyed_event), SELECT_INTERRUPTIBLE, abs_timeout, NULL, NULL ); - RtlLeaveCriticalSection( &addr_section ); - return ret; + return server_select( &select_op, sizeof(select_op.keyed_event), SELECT_INTERRUPTIBLE, abs_timeout, NULL, &addr_section, NULL ); } /***********************************************************************
1
0
0
0
Nikolay Sivov : ole32: Improve locking safety in IMalloc::Free().
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: da5903e7d17ab8af0ba0a2df395b13650123d712 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da5903e7d17ab8af0ba0a2df…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Apr 20 10:59:19 2020 +0300 ole32: Improve locking safety in IMalloc::Free(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/ifs.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index dfced20de2..f1dae0c956 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -254,35 +254,39 @@ static void * WINAPI IMalloc_fnRealloc(IMalloc *iface, void *pv, SIZE_T cb) /****************************************************************************** * IMalloc32_Free [VTABLE] */ -static void WINAPI IMalloc_fnFree(IMalloc *iface, void *pv) +static void WINAPI IMalloc_fnFree(IMalloc *iface, void *mem) { - BOOL fSpyed = FALSE; - - TRACE("(%p)\n",pv); - - if(!pv) - return; + BOOL spyed_block = FALSE, spy_active = FALSE; - if(Malloc32.pSpy) { - EnterCriticalSection(&IMalloc32_SpyCS); - fSpyed = mallocspy_remove_spyed_memory(pv); - pv = IMallocSpy_PreFree(Malloc32.pSpy, pv, fSpyed); - } + TRACE("(%p)\n", mem); - HeapFree(GetProcessHeap(),0,pv); + if (!mem) + return; - if(Malloc32.pSpy) { - IMallocSpy_PostFree(Malloc32.pSpy, fSpyed); + if (Malloc32.pSpy) + { + EnterCriticalSection(&IMalloc32_SpyCS); + spyed_block = mallocspy_remove_spyed_memory(mem); + spy_active = TRUE; + mem = IMallocSpy_PreFree(Malloc32.pSpy, mem, spyed_block); + } - /* check if can release the spy */ - if(Malloc32.SpyReleasePending && !Malloc32.SpyedAllocationsLeft) { - IMallocSpy_Release(Malloc32.pSpy); - Malloc32.SpyReleasePending = FALSE; - Malloc32.pSpy = NULL; - } + HeapFree(GetProcessHeap(), 0, mem); - LeaveCriticalSection(&IMalloc32_SpyCS); + if (spy_active) + { + IMallocSpy_PostFree(Malloc32.pSpy, spyed_block); + + /* check if can release the spy */ + if (Malloc32.SpyReleasePending && !Malloc32.SpyedAllocationsLeft) + { + IMallocSpy_Release(Malloc32.pSpy); + Malloc32.SpyReleasePending = FALSE; + Malloc32.pSpy = NULL; } + + LeaveCriticalSection(&IMalloc32_SpyCS); + } } /******************************************************************************
1
0
0
0
Anton Baskanov : amstream: Implement AMAudioStream::SetState.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: 86bc6a28f724e22c543cc3a3fe24729e39369fa6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86bc6a28f724e22c543cc3a3…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Sun Apr 19 17:14:20 2020 -0500 amstream: Implement AMAudioStream::SetState. Signed-off-by: Anton Baskanov <baskanov(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/audiostream.c | 13 ++++++++++--- dlls/amstream/tests/amstream.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/dlls/amstream/audiostream.c b/dlls/amstream/audiostream.c index 1f9aed7338..4e34b2549e 100644 --- a/dlls/amstream/audiostream.c +++ b/dlls/amstream/audiostream.c @@ -184,6 +184,7 @@ struct audio_stream IMemAllocator *allocator; AM_MEDIA_TYPE mt; WAVEFORMATEX format; + FILTER_STATE state; }; static inline struct audio_stream *impl_from_IAMMediaStream(IAMMediaStream *iface) @@ -340,11 +341,17 @@ static HRESULT WINAPI audio_IAMMediaStream_Initialize(IAMMediaStream *iface, IUn static HRESULT WINAPI audio_IAMMediaStream_SetState(IAMMediaStream *iface, FILTER_STATE state) { - struct audio_stream *This = impl_from_IAMMediaStream(iface); + struct audio_stream *stream = impl_from_IAMMediaStream(iface); - FIXME("(%p/%p)->(%u) stub!\n", This, iface, state); + TRACE("stream %p, state %u.\n", stream, state); - return S_FALSE; + EnterCriticalSection(&stream->cs); + + stream->state = state; + + LeaveCriticalSection(&stream->cs); + + return S_OK; } static HRESULT WINAPI audio_IAMMediaStream_JoinAMMultiMediaStream(IAMMediaStream *iface, diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 82a833ad6f..472c6558fc 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -2780,6 +2780,40 @@ static void test_audiostream_receive_connection(void) ok(!ref, "Got outstanding refcount %d.\n", ref); } +static void test_audiostream_set_state(void) +{ + IAMMultiMediaStream *mmstream = create_ammultimediastream(); + IAMMediaStream *am_stream; + IMediaStream *stream; + HRESULT hr; + ULONG ref; + + hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IMediaStream_QueryInterface(stream, &IID_IAMMediaStream, (void **)&am_stream); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IAMMediaStream_SetState(am_stream, 4); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IAMMediaStream_SetState(am_stream, State_Running); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IAMMediaStream_SetState(am_stream, State_Paused); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IAMMediaStream_SetState(am_stream, State_Stopped); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IAMMediaStream_Release(am_stream); + ref = IMediaStream_Release(stream); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + void test_mediastreamfilter_get_state(void) { IAMMultiMediaStream *mmstream = create_ammultimediastream(); @@ -2951,6 +2985,7 @@ START_TEST(amstream) test_audiostream_get_format(); test_audiostream_set_format(); test_audiostream_receive_connection(); + test_audiostream_set_state(); test_mediastreamfilter_get_state(); test_mediastreamfilter_stop_pause_run();
1
0
0
0
Zebediah Figura : msi: Report the real NT version number up to 6.3.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: 658183a803fced017e1e29f4001cec8b48748327 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=658183a803fced017e1e29f4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Apr 18 12:50:28 2020 -0500 msi: Report the real NT version number up to 6.3. MSI always reports 6.3 even without a manifest, but does not report anything higher. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48959
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/package.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 5065558827..7b64362b10 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -27,6 +27,7 @@ #include "winbase.h" #include "winreg.h" #include "winnls.h" +#include "winternl.h" #include "shlwapi.h" #include "wingdi.h" #include "msi.h" @@ -668,7 +669,7 @@ done: static VOID set_installer_properties(MSIPACKAGE *package) { WCHAR *ptr; - OSVERSIONINFOEXW OSVersion; + RTL_OSVERSIONINFOEXW OSVersion; MEMORYSTATUSEX msex; DWORD verval, len, type; WCHAR pth[MAX_PATH], verstr[11], bufstr[22]; @@ -860,9 +861,14 @@ static VOID set_installer_properties(MSIPACKAGE *package) msi_set_property( package->db, szPrivileged, szOne, -1 ); /* set the os things */ - OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); - GetVersionExW((OSVERSIONINFOW *)&OSVersion); + OSVersion.dwOSVersionInfoSize = sizeof(OSVersion); + RtlGetVersion(&OSVersion); verval = OSVersion.dwMinorVersion + OSVersion.dwMajorVersion * 100; + if (verval > 603) + { + verval = 603; + OSVersion.dwBuildNumber = 9600; + } len = swprintf( verstr, ARRAY_SIZE(verstr), szFormat, verval ); switch (OSVersion.dwPlatformId) {
1
0
0
0
Nikolay Sivov : ole32: Do not allocate spyed memory array on freeing attempts.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: ed53127580413b6d48c63e98e12ba7a801d64135 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ed53127580413b6d48c63e98…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Apr 20 10:59:18 2020 +0300 ole32: Do not allocate spyed memory array on freeing attempts. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/ifs.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index 1b19be424c..dfced20de2 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -128,22 +128,19 @@ static void** mallocspy_is_allocation_spyed(const void *mem) return current; } -static BOOL RemoveMemoryLocation(LPCVOID pMem) +static BOOL mallocspy_remove_spyed_memory(const void *mem) { - LPVOID * Current; + void **current; - /* allocate the table if not already allocated */ - if (!Malloc32.SpyedBlockTableLength && !SetSpyedBlockTableLength(0x1000)) - return FALSE; + if (!Malloc32.SpyedBlockTableLength) + return FALSE; - if (!(Current = mallocspy_is_allocation_spyed(pMem))) - return FALSE; + if (!(current = mallocspy_is_allocation_spyed(mem))) + return FALSE; - /* location found */ - Malloc32.SpyedAllocationsLeft--; - /*TRACE("%lu\n",Malloc32.SpyedAllocationsLeft);*/ - *Current = NULL; - return TRUE; + Malloc32.SpyedAllocationsLeft--; + *current = NULL; + return TRUE; } /****************************************************************************** @@ -216,7 +213,7 @@ static void * WINAPI IMalloc_fnRealloc(IMalloc *iface, void *pv, SIZE_T cb) BOOL fSpyed; EnterCriticalSection(&IMalloc32_SpyCS); - fSpyed = RemoveMemoryLocation(pv); + fSpyed = mallocspy_remove_spyed_memory(pv); cb = IMallocSpy_PreRealloc(Malloc32.pSpy, pv, cb, &pRealMemory, fSpyed); /* check if can release the spy */ @@ -268,7 +265,7 @@ static void WINAPI IMalloc_fnFree(IMalloc *iface, void *pv) if(Malloc32.pSpy) { EnterCriticalSection(&IMalloc32_SpyCS); - fSpyed = RemoveMemoryLocation(pv); + fSpyed = mallocspy_remove_spyed_memory(pv); pv = IMallocSpy_PreFree(Malloc32.pSpy, pv, fSpyed); }
1
0
0
0
Zebediah Figura : wineusb.sys: Implement URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: d6fac18a72a5e118b135e91cde89ab4b42e6e238 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d6fac18a72a5e118b135e91c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Apr 17 18:03:07 2020 -0500 wineusb.sys: Implement URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineusb.sys/wineusb.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/wineusb.sys/wineusb.c b/dlls/wineusb.sys/wineusb.c index a926970047..aa4f204415 100644 --- a/dlls/wineusb.sys/wineusb.c +++ b/dlls/wineusb.sys/wineusb.c @@ -431,6 +431,10 @@ static void transfer_cb(struct libusb_transfer *transfer) { switch (urb->UrbHeader.Function) { + case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: + urb->UrbBulkOrInterruptTransfer.TransferBufferLength = transfer->actual_length; + break; + case URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE: { struct _URB_CONTROL_DESCRIPTOR_REQUEST *req = &urb->UrbControlDescriptorRequest; @@ -488,6 +492,18 @@ static HANDLE make_pipe_handle(unsigned char endpoint, USBD_PIPE_TYPE type) return u.handle; } +static struct pipe get_pipe(HANDLE handle) +{ + union + { + struct pipe pipe; + HANDLE handle; + } u; + + u.handle = handle; + return u.pipe; +} + static NTSTATUS usb_submit_urb(struct usb_device *device, IRP *irp) { URB *urb = IoGetCurrentIrpStackLocation(irp)->Parameters.Others.Argument1; @@ -498,6 +514,43 @@ static NTSTATUS usb_submit_urb(struct usb_device *device, IRP *irp) switch (urb->UrbHeader.Function) { + case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: + { + struct _URB_BULK_OR_INTERRUPT_TRANSFER *req = &urb->UrbBulkOrInterruptTransfer; + struct pipe pipe = get_pipe(req->PipeHandle); + + if (req->TransferBufferMDL) + FIXME("Unhandled MDL output buffer.\n"); + + if (!(transfer = libusb_alloc_transfer(0))) + return STATUS_NO_MEMORY; + + if (pipe.type == UsbdPipeTypeBulk) + { + libusb_fill_bulk_transfer(transfer, device->handle, pipe.endpoint, + req->TransferBuffer, req->TransferBufferLength, transfer_cb, irp, 0); + } + else if (pipe.type == UsbdPipeTypeInterrupt) + { + libusb_fill_interrupt_transfer(transfer, device->handle, pipe.endpoint, + req->TransferBuffer, req->TransferBufferLength, transfer_cb, irp, 0); + } + else + { + WARN("Invalid pipe type %#x.\n", pipe.type); + libusb_free_transfer(transfer); + return USBD_STATUS_INVALID_PIPE_HANDLE; + } + + queue_irp(device, irp, transfer); + transfer->flags = LIBUSB_TRANSFER_FREE_TRANSFER; + ret = libusb_submit_transfer(transfer); + if (ret < 0) + ERR("Failed to submit bulk transfer: %s\n", libusb_strerror(ret)); + + return STATUS_PENDING; + } + case URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE: { struct _URB_CONTROL_DESCRIPTOR_REQUEST *req = &urb->UrbControlDescriptorRequest;
1
0
0
0
Nikolay Sivov : ole32: Remove unused field.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: master Commit: 7c4106aa892ff93eff90b32f6f048d8cd379e0bf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c4106aa892ff93eff90b32f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Apr 20 10:59:21 2020 +0300 ole32: Remove unused field. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/ifs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index 96977fc751..62007800e3 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -49,7 +49,6 @@ static const IMallocVtbl VT_IMalloc32; typedef struct { IMalloc IMalloc_iface; - DWORD dummy; /* nothing, we are static */ IMallocSpy * pSpy; /* the spy when active */ DWORD SpyedAllocationsLeft; /* number of spyed allocations left */ BOOL SpyReleasePending; /* CoRevokeMallocSpy called with spyed allocations left*/ @@ -58,7 +57,7 @@ typedef struct { } _Malloc32; /* this is the static object instance */ -static _Malloc32 Malloc32 = {{&VT_IMalloc32}, 0, NULL, 0, 0, NULL, 0}; +static _Malloc32 Malloc32 = {{&VT_IMalloc32}, NULL, 0, 0, NULL, 0}; /* with a spy active all calls from pre to post methods are threadsafe */ static CRITICAL_SECTION IMalloc32_SpyCS;
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
102
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200