[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 215131] KDevelop crashes while editing C++ code using template
From:       "Olivier.jg" <olivier.jg () gmail ! com>
Date:       2009-11-28 8:15:50
Message-ID: 20091128081550.12266281C9 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=215131





--- Comment #6 from Olivier.jg <olivier jg gmail com>  2009-11-28 09:15:46 ---
For some reason I'm now able to easily reproduce this, unfortunately I don't
have the time to finish debugging and get a patch today, but here's what I know
about it...

This crash happens on documentrangeobject.cpp:66. At that point the dd_ptr is
corrupted (but not 0x0, just wrong), and thus it's m_smartMutex is crap (often
0x0 in my testing).

The object has been deleted at declarationbuilder.cpp:223. As far as I could
tell, that code path is never triggered without running into this bug. In other
words, it's rarely hit, but whenever it is hit, it crashes.

Simply commenting out that "delete tempContext" line will "fix" this bug, but
I'm guessing there's a reason why it's being deleted. It does seem odd to
delete that context though, as it's obviously used again later.

Finally, I've been able to reproduce it perfectly with this single line of
code:
template <> This<That>::func(int e);

Note that the template code doesn't seem to have anything to do with it, it's
merely the easiest way to crash it. I've also managed to trigger it with:
/*template <>*/This/*<That>*/::func(int e);
And with:
This::func(int e);

In other words, it doesn't seem to be a parser bug that's causing it to reuse
the deleted context.

@David Nolden, any idea why that tempContext is being deleted there? Or if
that's supposed to be like that, any idea why it would get reused?
I get the feeling this bug could trigger a whole lot of seemingly random
crashes, it's probably a good one to fix.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic