delete this dangerous in duchain? [was: Crash in duchaintest]
David nolden
david.nolden.kdevelop at art-master.de
Sun Feb 1 17:49:10 UTC 2009
Am Sonntag 01 Februar 2009 18:32:53 schrieb Andreas Pakulat:
> On 30.01.09 20:41:41, Andreas Pakulat wrote:
> > Hi,
> >
> > happens when executing duchaintest, apparently in the
> > spezializedTemplateTest().
> >
> > The crash is actually inside the assembler code for the return call in
> > the TopDUContext::deleting() method. No idea what might be going on,
> > maybe I can talk Frerich (our assembler guru) into doing some debugging
> > with me next week...
It copies away the required data before calling "delete this", so this should
be safe.
Actually, all the child-contexts and declarations should have been deleted
recursively from within DUContext::~DUContext. Then this call from within the
destructor of TopDUContextDynamicData would not happen. It's true that this
access to m_dynamicData is unsafe.
You should find out why the destructors are not called properly. Notice that
all the C++ contexts are either of type CppDUContext<DUContext> or
CppDUContext<TopDUContext>. It's possible that msvc also has some problems
with CppDUContext. You should put some log-output into ~CppDUContext and
~DUContext to see whether the whole chain is called properly.
Greetings, David
More information about the KDevelop-devel
mailing list