Summary: | crash when using temporary preprocessor macros (possibly related to code completion) | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Ted Cipicchio <ted> |
Component: | Language Support: CPP (old) | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | roberto |
Priority: | NOR | ||
Version: | 3.0.0b1 | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | crash-patch |
Description
Ted Cipicchio
2003-11-21 02:04:20 UTC
Created attachment 3314 [details]
crash-patch
Confirmed. Somewhere in the middle of Lexer::nextToken(), the referenced mapentry seems to get invalidated. This simplistic patch avoids crashing on my system, but as I have no idea about the code, I can't be sure the fix is correct. Please test. Roberto? :) (Patch attached above. I'm sure I'll learn this system one day... ) Subject: kdevelop/lib/cppparser CVS commit by dagerbo: Take a copy of the structure while it is valid in order not to crash later. I don't know why the map entry gets invalidated, but Roberto says the patch works, so here goes... CCMAIL: 68704-done@bugs.kde.org M +2 -1 lexer.cpp 1.21 --- kdevelop/lib/cppparser/lexer.cpp #1.20:1.21 @@ -290,5 +290,6 @@ void Lexer::nextToken( Token& tk, bool s int svColumn = currentColumn(); - Macro& m = m_driver->macro( ide ); +// Macro& m = m_driver->macro( ide ); + Macro m = m_driver->macro( ide ); //m_driver->removeMacro( m.name() ); Looks to be working okay on my end, too. (Figured I'd reply anyway even though the bug is already marked as fixed.) Great. Thanks for the input! Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively |