datarace in setrepository::isempty
Milian Wolff
mail at milianw.de
Thu Sep 30 16:49:30 UTC 2010
On Thursday, 30. September 2010 18:47:02 Milian Wolff wrote:
> Imo this is a valid complain, no? It should get a StaticAccessLocker as
> well before the m_setIndex == 0 comparison? Or use a QAtomicInt?
>
> Bye
Maybe this is because Helgrind does not now our DUChain locks, does anyone
have any idea on how to change this?
Here is a similar race:
==7178== Possible data race during read of size 4 at 0xf292328 by thread #6
==7178== at 0x684C1E0: KDevelop::TopDUContext::d_func() const
(topducontext.h:391)
==7178== by 0x6887EE6: KDevelop::TopDUContext::usingImportsCache() const
(topducontext.cpp:673)
==7178== by 0x688C6DC:
KDevelop::TopDUContextLocalPrivate::addImportedContextRecursion(KDevelop::TopDUContext
const*, KDevelop::TopDUContext const*, int, bool) (topducontext.cpp:412)
==7178== by 0x688C885:
KDevelop::TopDUContextLocalPrivate::addImportedContextRecursion(KDevelop::TopDUContext
const*, KDevelop::TopDUContext const*, int, bool) (topducontext.cpp:462)
==7178== by 0x688C885:
KDevelop::TopDUContextLocalPrivate::addImportedContextRecursion(KDevelop::TopDUContext
const*, KDevelop::TopDUContext const*, int, bool) (topducontext.cpp:462)
==7178== by 0x688C885:
KDevelop::TopDUContextLocalPrivate::addImportedContextRecursion(KDevelop::TopDUContext
const*, KDevelop::TopDUContext const*, int, bool) (topducontext.cpp:462)
==7178== by 0x688C885:
KDevelop::TopDUContextLocalPrivate::addImportedContextRecursion(KDevelop::TopDUContext
const*, KDevelop::TopDUContext const*, int, bool) (topducontext.cpp:462)
==7178== by 0x688BF62:
KDevelop::TopDUContextLocalPrivate::addImportedContextRecursively(KDevelop::TopDUContext*,
bool, bool) (topducontext.cpp:295)
==7178== by 0x6889A06:
KDevelop::TopDUContext::addImportedParentContext(KDevelop::DUContext*,
KDevelop::SimpleCursor const&, bool, bool) (topducontext.cpp:1260)
==7178== by 0xD092724: CMakeProjectVisitor::createContext(KUrl const&,
KDevelop::ReferencedTopDUContext, int, int, bool)
(cmakeprojectvisitor.cpp:713)
==7178== by 0xD0A2E33: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc>
const&, int, bool) (cmakeprojectvisitor.cpp:2076)
==7178== by 0xD09038C: CMakeProjectVisitor::visit(IncludeAst const*)
(cmakeprojectvisitor.cpp:537)
==7178== This conflicts with a previous write of size 4 by thread #2
==7178== at 0x681C990:
KDevelop::DocumentRangeObject::setData(KDevelop::DocumentRangeObjectData*,
bool) (documentrangeobject.cpp:139)
==7178== by 0x68B3357:
KDevelop::DUChainBase::setData(KDevelop::DocumentRangeObjectData*, bool)
(duchainbase.cpp:74)
==7178== by 0x6895256: saveDUChainItem(QList<QPair<QByteArray, unsigned
int> >&, KDevelop::DUChainBase&, unsigned int&)
(topducontextdynamicdata.cpp:69)
==7178== by 0x6898265: KDevelop::TopDUContextDynamicData::store()
(topducontextdynamicdata.cpp:544)
==7178== by 0x684F7F0: KDevelop::DUChainPrivate::doMoreCleanup(int, bool)
(duchain.cpp:752)
==7178== by 0x684CC9B: KDevelop::DUChainPrivate::CleanupThread::run()
(duchain.cpp:294)
==7178== by 0x544BFBD: QThreadPrivate::start(void*) (qthread_unix.cpp:248)
==7178== by 0x4028734: mythread_wrapper (hg_intercepts.c:221)
==7178== Address 0xf292328 is 8 bytes inside a block of size 36 alloc'd
==7178== at 0x4024C5C: operator new(unsigned int) (vg_replace_malloc.c:255)
==7178== by 0x6894BB6: KDevelop::DUChainItemFactory<KDevelop::TopDUContext,
KDevelop::TopDUContextData>::create(KDevelop::DUChainBaseData*) const
(duchainregister.h:49)
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100930/3275f48f/attachment.sig>
More information about the KDevelop-devel
mailing list