tsan: data race
Atomic write of size 4 at 0x7254000f5f08 by thread T38 (mutexes: write M0, write M1, write M2): 0 configmgr::Access::acquireCounting() 1 configmgr::Components::initGlobalBroadcaster(configmgr::Modifications const&, rtl::Reference<configmgr::RootAccess> const&, configmgr::Broadcaster*) 2 configmgr::RootAccess::commitChanges() 3 non-virtual thunk to configmgr::RootAccess::commitChanges() 4 utl::OConfigurationTreeRoot::commit() 5 dbaccess::(anonymous namespace)::DatabaseRegistrations::registerDatabaseLocation(rtl::OUString const&, rtl::OUString const&) 6 non-virtual thunk to dbaccess::(anonymous namespace)::DatabaseRegistrations::registerDatabaseLocation(rtl::OUString const&, rtl::OUString const&) 7 dbaccess::ODatabaseContext::registerDatabaseLocation(rtl::OUString const&, rtl::OUString const&) 8 dbaccess::ODatabaseContext::registerObject(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) 9 non-virtual thunk to dbaccess::ODatabaseContext::registerObject(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) 10 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) Previous read of size 4 at 0x7254000f5f08 by main thread (mutexes: write M3, write M4): 0 cppu::OWeakObject::disposeWeakConnectionPoint() 1 cppu::OWeakObject::release() 2 configmgr::RootAccess::release() 3 non-virtual thunk to configmgr::RootAccess::release() 4 com::sun::star::uno::Reference<com::sun::star::util::XChangesBatch>::~Reference() 5 SvtLinguConfig::~SvtLinguConfig() 6 SwDoc::GetGCIterator() 7 SwDoc::StartGrammarChecking(bool) 8 sw::DocumentTimerManager::GetNextIdleJob() 9 sw::DocumentTimerManager::IsDocIdle() 10 sw::SwDocIdle::UpdateMinPeriod(unsigned long) const 11 Scheduler::CallbackTaskScheduling() Change-Id: Idaf2707e5902338a873a325228e9c97e646ea768 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172874 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <com/sun/star/lang/DisposedException.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
@@ -232,7 +233,7 @@ void SAL_CALL OWeakObject::release() noexcept
|
||||
|
||||
void OWeakObject::disposeWeakConnectionPoint()
|
||||
{
|
||||
OSL_PRECOND( m_refCount == 0, "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
|
||||
OSL_PRECOND( (atomic_thread_fence(std::memory_order_acquire), m_refCount == 0), "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
|
||||
if (m_pWeakConnectionPoint != nullptr) {
|
||||
OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
|
||||
m_pWeakConnectionPoint = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user