dbaccess/source/core/dataaccess/databasedocument.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 0dcda9455d828e31bda416229a5324491353b6a0 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Sep 4 18:53:40 2024 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Sep 6 10:26:13 2024 +0200 tsan: data race Read of size 1 at 0x7250000be3fd by thread T19: 0 dbaccess::ODatabaseDocument::queryInterface(com::sun::star::uno::Type const&) 1 non-virtual thunk to dbaccess::ODatabaseDocument::queryInterface(com::sun::star::uno::Type const&) 2 com::sun::star::uno::BaseReference::iquery(com::sun::star::uno::XInterface*, com::sun::star::uno::Type const&) 3 com::sun::star::uno::Reference<com::sun::star::frame::XFrame>::iquery(com::sun::star::uno::XInterface*) Previous write of size 1 at 0x7250000be3fd by thread T8 (mutexes: write M0): 0 dbaccess::ODatabaseDocument::storeAsURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) 1 non-virtual thunk to dbaccess::ODatabaseDocument::storeAsURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) 2 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) Change-Id: I40ce0b5995f94455b5d9ca1d652a58df96b5f553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172873 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit d50f3fa9f5811204fbf2350e4745a26154fce6d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172893 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index 545ae9f92164..2700e358a506 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -20,6 +20,7 @@ #include <sal/config.h> +#include <atomic> #include <map> #include <memory> @@ -192,7 +193,8 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe */ InitState m_eInitState; bool m_bClosing; - bool m_bAllowDocumentScripting; + /// Using atomic because locking around accessing this will lead to deadlock in queryInterface + std::atomic<bool> m_bAllowDocumentScripting; bool m_bHasBeenRecovered; /// If XModel::attachResource() was called to inform us that the document is embedded into another one. bool m_bEmbedded;