Bug 216071 - kdevelop languages cpp parser
Summary: kdevelop languages cpp parser
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-25 10:58 UTC by Andrea Nicotra
Modified: 2009-11-25 11:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Nicotra 2009-11-25 10:58:09 UTC
Version:           svn Revision: 1053877 (using KDE 4.3.2)
Compiler:          gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) 
OS:                Linux
Installed from:    Ubuntu Packages

I start kedevleop (Revisione: 1053877) with alredy charged 3 project ( kdevelop, kdevplatform and one my project ) and after few minute it goes on Segmentation fault.

...
kdevelop(14356)/kdevelop (cpp support) CppUtils::findInclude: KUrl("file:///usr/include/c++/4.4/backward")                                                       
kdevelop(14356)/kdevelop (cpp support) CppUtils::findInclude: KUrl("file:///usr/local/include")                                                                  
kdevelop(14356)/kdevelop (cpp support) CppUtils::findInclude: KUrl("file:///usr/lib/gcc/x86_64-linux-gnu/4.4.1/include")                                         
kdevelop(14356)/kdevelop (cpp support) CppUtils::findInclude: KUrl("file:///usr/lib/gcc/x86_64-linux-gnu/4.4.1/include-fixed")                                   
kdevelop(14356)/kdevelop (cpp support) CppUtils::findInclude: KUrl("file:///usr/include")                                                                        
kdevelop(14356)/kdevelop (cpp support) PreprocessJob::sourceNeeded: PreprocessJob "/home/andrea/workspace/svn/kdevplatform/plugins/subversion/svninternaljobbase.h" : include not found: "svn_wc.h"         
kdevelop(14356)/kdevplatform rpp::pp_macro_expander::operator:  ======================= if (macro->definitionSize())  macro->definitionSize:  243
kdevelop(14356)/kdevplatform rpp::pp_macro_expander::operator:  ======================= hidden:  false
kdevelop(14356)/kdevplatform rpp::pp_macro_expander::operator:  ======================= definition:  0x7fffd4af1fa7
kdevelop(14356)/kdevplatform rpp::pp_macro_expander::operator:  ======================= definitionString:  "Q_OBJECT public:  Q_OBJECT_CHECK  static const QMetaObject staticMetaObject;  virtual const QMetaObject *metaObject() const;  virtual void *qt_metacast(const char *);  QT_TR_FUNCTIONS  virtual int qt_metacall(QMetaObject::Call, int, void **);  private:"

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcf7fe910 (LWP 14639)]
rpp::pp_macro_expander::operator() (this=0x7fffcf7f8738, input=..., output=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:385
385                 macro->hidden = true;

backtrace:

#0  rpp::pp_macro_expander::operator() (this=0x7fffcf7f8738, input=..., output=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp:385
#1  0x00007fffd53a9c0d in rpp::pp::operator() (this=0x7fffcf7f8730, input=..., output=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:261
#2  0x00007fffd53a9de9 in rpp::pp::processFileInternal (this=0x7fffcf7f8730, fileName=<value optimised out>, fileContents=<value optimised out>, result=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:98
#3  0x00007fffd53a9e7a in rpp::pp::processFile (this=0x7fffcf7f8730, fileName=..., data=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:85
#4  0x00007fffd5602735 in PreprocessJob::run (this=0x4834b90) at /home/andrea/workspace/svn/kdevelop/languages/cpp/preprocessjob.cpp:233
#5  0x00007fffd55f74c3 in CPPParseJob::parseForeground (this=0x4605f80) at /home/andrea/workspace/svn/kdevelop/languages/cpp/cppparsejob.cpp:203
#6  0x00007fffd5603e5b in PreprocessJob::sourceNeeded (this=0x48657a0, _fileName=<value optimised out>, type=<value optimised out>, sourceLine=23,
    skipCurrentPath=<value optimised out>) at /home/andrea/workspace/svn/kdevelop/languages/cpp/preprocessjob.cpp:565
#7  0x00007fffd53a926b in rpp::pp::handle_include (this=0x7fffcf7fa910, skip_current_path=false, input=..., output=<value optimised out>)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:193
#8  0x00007fffd53a9876 in rpp::pp::handle_directive (this=0x7fffcf7fa910, directive=74656, input=..., output=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:131
#9  0x00007fffd53a9b58 in rpp::pp::operator() (this=0x7fffcf7fa910, input=..., output=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:246
#10 0x00007fffd53a9de9 in rpp::pp::processFileInternal (this=0x7fffcf7fa910, fileName=<value optimised out>, fileContents=<value optimised out>, result=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:98
#11 0x00007fffd53a9e7a in rpp::pp::processFile (this=0x7fffcf7fa910, fileName=..., data=...)
    at /home/andrea/workspace/svn/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:85


I try to fix that bug, but I don't have good experience with the kdevelop code ( I'll try but for now only bugreport)
Comment 1 David Nolden 2009-11-25 11:28:05 UTC
SVN commit 1054005 by zwabel:

Never temporarily modify macros in the current environment, as it crashes if the macro has been mmapped in read-only mode.
Instead, insert temporary macros.
BUG: 216071


 M  +5 -0      pp-environment.cpp  
 M  +4 -0      pp-environment.h  
 M  +28 -7     pp-macro-expander.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1054005
Comment 2 Niko Sams 2009-11-25 11:33:43 UTC
that was fast :D