[Bug 68704] crash when using temporary preprocessor macros (possibly related to code completion)

Jens Dagerbo jens.dagerbo at swipnet.se
Fri Nov 21 13:26:03 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=68704     
jens.dagerbo at swipnet.se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jens.dagerbo at swipnet.se  2003-11-21 13:25 -------
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 at 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() );




More information about the KDevelop-devel mailing list