From cc2372a7e7418cc0bef78c8753e7ed577304472a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 23 Mar 2025 10:22:17 +0000 Subject: [PATCH] cid#1645104 Data race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1645088 Data race condition cid#1645086 Data race condition presumably the mutex is just for maBuffered2DDecomposition, otherwise setting maLastAccess with the mutex held implies all the other maLastAccess uses should be protected with that mutex Change-Id: I918b8854a2abbb8436200c98cf545e217b19bba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183244 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- .../source/primitive2d/BufferedDecompositionPrimitive2D.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx b/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx index f9e476021e44..f51f37c85966 100644 --- a/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx +++ b/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx @@ -82,9 +82,9 @@ void BufferedDecompositionPrimitive2D::get2DDecomposition( // manipulated (e.g. deleted) Primitive2DReference xTmp; { + maLastAccess = std::chrono::steady_clock::now(); // only hold the lock for long enough to get a valid reference std::lock_guard Guard(maCallbackLock); - maLastAccess = std::chrono::steady_clock::now(); if (!maBuffered2DDecomposition) { maBuffered2DDecomposition = create2DDecomposition(rViewInformation);