vcl/source/helper/threadex.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit ad161bf882099553949469f99759493c38169c8a
Author: Mike Kaganski <[email protected]>
AuthorDate: Thu Mar 14 23:03:55 2024 +0500
Commit: Mike Kaganski <[email protected]>
CommitDate: Thu Mar 14 21:56:46 2024 +0100
Make sure we hold the solar mutex before trying to release it
Might be not guarded by the solar mutex (and need not to!) e.g. when
an external script calls XDispatchHelper::executeDispatch, with stack
like this:
vcllo.dll!vcl::SolarThreadExecutor::execute() Line 55 C++
fwklo.dll!vcl::solarthread::detail::GenericSolarThreadExecutor<`framework::DispatchHelper::executeDispatch'::`8'::<lambda_1>,com::sun::star::uno::Any>::exec(const
framework::DispatchHelper::executeDispatch::__l8::<lambda_1> & func) Line 63
C++
fwklo.dll!vcl::solarthread::syncExecute<`framework::DispatchHelper::executeDispatch'::`8'::<lambda_1>>(const
framework::DispatchHelper::executeDispatch::__l8::<lambda_1> & func) Line 166
C++
fwklo.dll!framework::DispatchHelper::executeDispatch(const
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> &
xDispatchProvider, const rtl::OUString & sURL, const rtl::OUString &
sTargetFrameName, long nSearchFlags, const
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &
lArguments) Line 116 C++
mscx_uno.dll!`anonymous
namespace'::cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
_typelib_TypeDescriptionReference * pReturnTypeRef, long nParams,
_typelib_MethodParameter * pParams, void * pUnoReturn, void * * pUnoArgs,
_uno_Any * * ppUnoExc) Line 214 C++
mscx_uno.dll!unoInterfaceProxyDispatch(_uno_Interface * pUnoI, const
_typelib_TypeDescription * pMemberTD, void * pReturn, void * * pArgs, _uno_Any
* * ppException) Line 430 C++
binaryurplo.dll!binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny
* returnValue,
std::vector<binaryurp::BinaryAny,std::allocator<binaryurp::BinaryAny>> *
outArguments) Line 239 C++
binaryurplo.dll!binaryurp::IncomingRequest::execute() Line 79 C++
binaryurplo.dll!request(void * pThreadSpecificData) Line 84 C++
cppu3.dll!cppu_threadpool::JobQueue::enter(const void * nDisposeId, bool
bReturnWhenNoJob) Line 101 C++
cppu3.dll!cppu_threadpool::ORequestThread::run() Line 169 C++
cppu3.dll!threadFunc(void * param) Line 190 C++
sal3.dll!oslWorkerWrapperFunction(void * pData) Line 69 C++
ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void *),1>(void *
const parameter) Line 97 C++
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
Change-Id: Ic8ffa802f8d9f9165bf5274ddbc06fd70d3a5f5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164843
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <[email protected]>
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index cbd342bd28df..1590b91f1167 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -52,6 +52,7 @@ void SolarThreadExecutor::execute()
m_aStart.reset();
m_aFinish.reset();
ImplSVEvent* nEvent = Application::PostUserEvent(LINK(this,
SolarThreadExecutor, worker));
+ SolarMutexGuard aGuard;
SolarMutexReleaser aReleaser;
if (m_aStart.wait() == osl::Condition::result_timeout)
{