| commit | 5070fa647ed09c16d49b3a1a1a7d1cdc8035af2e | [log] |
|---|---|---|
| author | Jan-Marek Glogowski <glogow@fbihome.de> | Fri Jan 25 10:05:36 2019 +0000 |
| committer | Michael Stahl <Michael.Stahl@cib.de> | Tue Jan 29 11:02:44 2019 +0100 |
| tree | 76403ab56fcb42dc6273f8e9c8b15b27abfc4c6e | |
| parent | 36d5fd037439f84a688b96ec5af9e47d4a58712e [diff] |
tdf#122927 prevent SolarMutex deadlock on join() The AsyncRequests thread can be blocked in a SolarMutexGuard, so we have to release the mutex before calling join(). But there is also a static AsyncRequests object inside the VistaFilePickerEventHandler::impl_sendEvent function, which will just be cleaned up at DLL atexit. "Luckily" it won't ever run, so it doesn't need to be joined and we can use isRunning to detect it, prevent releasing a non- existing SolarMutex at this point and so won't crash LO on exit. Reviewed-on: https://gerrit.libreoffice.org/66901 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 5b2f1243bd44b450da26c8344b3ee459f8e88f6c) Reviewed-on: https://gerrit.libreoffice.org/66913 Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org> (cherry picked from commit 1ed8416703d1f1a33690cc47fd6cb6b2b3520cf1) Change-Id: I0c56b89a11f96be54e82b756c5e18a058b04a41d Reviewed-on: https://gerrit.libreoffice.org/66979 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx index 766a230..c7fb3f7 100644 --- a/fpicker/source/win32/filepicker/asyncrequests.cxx +++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -75,7 +75,14 @@ aLock.clear(); // <- SYNCHRONIZED join(); // The static AsyncRequests aNotify in VistaFilePickerEventHandler::impl_sendEvent // is destructed at DLL atexit. But it won't run, so needs no join and release of // the already destructed SolarMutex, which would crash LO on exit. if (isRunning()) { SolarMutexReleaser aReleaser; join(); } } void AsyncRequests::triggerJobExecution()