Lorenzo Ferrillo : ole32: Leave the RunningObjectTable Critical Section before umarshalling object.
Module: wine Branch: master Commit: 7860dd06419e1d124f9f1389b39e3e79f26d551b URL: https://gitlab.winehq.org/wine/wine/-/commit/7860dd06419e1d124f9f1389b39e3e7... Author: Lorenzo Ferrillo <lorenzofersteam(a)live.it> Date: Sun Sep 10 18:02:56 2023 +0200 ole32: Leave the RunningObjectTable Critical Section before umarshalling object. Sometimes umarshalling an object from the RunningObjectTable can cause the routine to access the table back inside another thread, causing a deadlock. Visual Studio 2019 is an example of this behaviour. Signed-off-by: Lorenzo Ferrillo <lorenzofersteam(a)live.it> --- dlls/ole32/moniker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c index ec026758b2f..f9f266044e4 100644 --- a/dlls/ole32/moniker.c +++ b/dlls/ole32/moniker.c @@ -541,13 +541,14 @@ RunningObjectTableImpl_GetObject( IRunningObjectTable* iface, { IStream *pStream; hr = create_stream_on_mip_ro(rot_entry->object, &pStream); + LeaveCriticalSection(&This->lock); + if (hr == S_OK) { hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)ppunkObject); IStream_Release(pStream); } - LeaveCriticalSection(&This->lock); HeapFree(GetProcessHeap(), 0, moniker_data); return hr;
participants (1)
-
Alexandre Julliard