From 60b4041d0ef520296007448a1d67fa147723b711 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 20 Mar 2019 08:42:54 +0100 Subject: [PATCH] Resolves: rhbz#1687589 KDE4 gpoll_wrapper can be called with SolarMutex locked --- ...4-gpoll_wrapper-can-be-called-with-S.patch | 47 +++++++++++++++++++ libreoffice.spec | 6 ++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 0001-rhbz-1687589-KDE4-gpoll_wrapper-can-be-called-with-S.patch diff --git a/0001-rhbz-1687589-KDE4-gpoll_wrapper-can-be-called-with-S.patch b/0001-rhbz-1687589-KDE4-gpoll_wrapper-can-be-called-with-S.patch new file mode 100644 index 0000000..4065d5f --- /dev/null +++ b/0001-rhbz-1687589-KDE4-gpoll_wrapper-can-be-called-with-S.patch @@ -0,0 +1,47 @@ +From ad313992da1cf89f5825a4d1eb020392b5e32c6d Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 19 Mar 2019 17:29:53 +0100 +Subject: [PATCH] rhbz#1687589: KDE4 gpoll_wrapper can be called with + SolarMutex unlocked + +...when called from MountOperation::Mount (ucb/source/ucp/gio/gio_content.cxx), +which itself contains a SolarMutexReleaser since +2eb36dc4b846ab5886ae71fd2978b56b2a2d1d08 "Hack to not leave SolarMutex released +after g_main_loop_run call". So calling SolarMutexReleaser ctor in +gpoll_wrapper will then cause comphelper::GenericSolarMutex::doRelease +(comphelper/source/misc/solarmutex.cxx) to call std::abort() because the +SolarMutex is not locked. + +Change-Id: If893b427e404cf3d9e48430f84cff7d32b61bf87 +Reviewed-on: https://gerrit.libreoffice.org/69436 +Tested-by: Jenkins +Reviewed-by: Michael Weghorn +--- + vcl/unx/kde4/KDEXLib.cxx | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx +index 0852c543a6d7..22274690842b 100644 +--- a/vcl/unx/kde4/KDEXLib.cxx ++++ b/vcl/unx/kde4/KDEXLib.cxx +@@ -210,8 +210,15 @@ static GPollFunc old_gpoll = nullptr; + + static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout ) + { +- SolarMutexReleaser aReleaser; +- return old_gpoll( ufds, nfds, timeout ); ++ if (GetSalData()->m_pInstance->GetYieldMutex()->IsCurrentThread()) ++ { ++ SolarMutexReleaser aReleaser; ++ return old_gpoll( ufds, nfds, timeout ); ++ } ++ else ++ { ++ return old_gpoll( ufds, nfds, timeout ); ++ } + } + #endif + +-- +2.20.1 + diff --git a/libreoffice.spec b/libreoffice.spec index ccf492a..e4377b8 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 3%{?libo_prerelease}%{?dist} +Release: 4%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -240,6 +240,7 @@ Patch1: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch # not upstreamed Patch2: 0001-Upgrade-external-boost-to-Boost-1.69.0.patch Patch3: 0001-menu-of-currency-combobox-in-format-cells-is-too-nar.patch +Patch4: 0001-rhbz-1687589-KDE4-gpoll_wrapper-can-be-called-with-S.patch %if 0%{?rhel} # not upstreamed @@ -2120,6 +2121,9 @@ done %{_includedir}/LibreOfficeKit %changelog +* Wed Mar 20 2019 Stephan Bergmann - 1:6.2.1.2-4 +- Resolves: rhbz#1687589 KDE4 gpoll_wrapper can be called with SolarMutex locked + * Tue Mar 12 2019 Caolán McNamara - 1:6.2.1.2-3 - currency menu too narrow