sc/inc/refreshtimer.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 4361ee2585e616cb3c504eb719deca4076de78da Author: Eike Rathke <er...@redhat.com> AuthorDate: Sat Feb 26 01:57:51 2022 +0100 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sat Feb 26 02:57:58 2022 +0100 Resolves: tdf#147448 ScRefreshTimerControl mutex must be std::recursive_mutex ScRefreshTimer::Invoke() locks the mutex and subsequent nested locks are attempted in ScDocShell::ConvertFrom() and ScDocShellModificator ctor by ScRefreshTimerProtector. A std::mutex must not be owned by the calling thread when a lock is attempted, otherwise even deadlocks may occur, as was the case here. This is exactly the difference of std::recursive_mutex. Likely a regression from commit 287680683ca266f1fb4f447ac9bdaf76669d559d CommitDate: Mon Aug 2 12:17:07 2021 +0200 osl::Mutex->std::mutex in ScRefreshTimer Change-Id: Iaa0f1da2b4b9616e9627d8d0001775f554756048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130573 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx index 546fa7feda2c..16ae0c7201d2 100644 --- a/sc/inc/refreshtimer.hxx +++ b/sc/inc/refreshtimer.hxx @@ -28,14 +28,14 @@ class ScRefreshTimerControl { - std::mutex aMutex; - sal_uInt16 nBlockRefresh; + std::recursive_mutex aMutex; + sal_uInt16 nBlockRefresh; public: ScRefreshTimerControl() : nBlockRefresh(0) {} void SetAllowRefresh( bool b ); bool IsRefreshAllowed() const { return !nBlockRefresh; } - std::mutex& GetMutex() { return aMutex; } + std::recursive_mutex& GetMutex() { return aMutex; } }; class ScRefreshTimer : public AutoTimer