| Summary: | When opening a file that has a php4 class with a property with same name as the class and referencing a property of the class inside a string without using curly-braces.... .it crashes | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Adam Wagner <awagner83> |
| Component: | Language Support: PHP | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | the.germanboy |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Unlisted Binaries | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
SVN commit 1032947 by mwolff: fix crash with encapsed properties when we have a property with the same name as the class add test that shows the crash is gone. BUG: 209814 M +14 -20 expressionvisitor.cpp M +18 -0 tests/test_duchain.cpp M +1 -0 tests/test_duchain.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1032947 |
Application that crashed: kdevelop Version of the application: 3.9.95 (using KDevPlatform 0.9.95) KDE Version: 4.3.1 (KDE 4.3.1) Qt Version: 4.5.2 Operating System: Linux 2.6.30.8-64.fc11.x86_64 x86_64 What I was doing when the application crashed: kdevelop (SVN) crashes when I open a file with this: <?php class foo { var $foo; function bar() { "$this->baz"; } } -- Backtrace: Application: KDevelop (kdevelop), signal: Segmentation fault [Current thread is 1 (Thread 0x7fc641a44820 (LWP 19555))] Thread 4 (Thread 0x7fc6398e9910 (LWP 19556)): #0 0x0000003aa100b57d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x0000003aabc5ad62 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007fc6421c4dce in KDevelop::DUChainPrivate::CleanupThread::run (this=0x23e13f0) at /home/awagner/Sources/kdevplatform/language/duchain/duchain.cpp:280 #3 0x0000003aabc59d45 in ?? () from /usr/lib64/libQtCore.so.4 #4 0x0000003aa100686a in start_thread () from /lib64/libpthread.so.0 #5 0x0000003aa04de3bd in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? () Thread 3 (Thread 0x7fc62b32e910 (LWP 19573)): #0 0x0000003aa04d50d3 in poll () from /lib64/libc.so.6 #1 0x0000003aa1c3c96c in ?? () from /lib64/libglib-2.0.so.0 #2 0x0000003aa1ee4ac8 in ?? () from /lib64/libglib-2.0.so.0 #3 0x0000003aa1ee4b00 in ?? () from /lib64/libglib-2.0.so.0 #4 0x0000003affffffff in ?? () #5 0x00007fc62b32de68 in ?? () #6 0x0000000100000001 in ?? () #7 0x00007fc624000998 in ?? () #8 0x00007fc624000990 in ?? () #9 0x7fffffffffffffff in ?? () #10 0x0000000000000000 in ?? () Thread 2 (Thread 0x7fc62965b910 (LWP 19579)): [KCrash Handler] #5 KDevelop::DUContext::findDeclarations (this=0x0, identifier=<value optimized out>, position=@0x7fc6296589d0, dataType=<value optimized out>, topContext=0x0, flags={i = 0}) at /home/awagner/Sources/kdevplatform/language/duchain/ducontext.cpp:902 #6 0x00007fc62b7dca67 in Php::ExpressionVisitor::visitEncapsVar (this=0x7fc629658e70, node=0x7fc62002dd70) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionvisitor.cpp:399 #7 0x00007fc62b5827dd in Php::DefaultVisitor::visitEncapsList (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:396 #8 0x00007fc62b7dbfd3 in Php::ExpressionVisitor::visitScalar (this=0x7fc629658890, node=0x1) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionvisitor.cpp:315 #9 0x00007fc62b5837d7 in Php::DefaultVisitor::visitVarExpressionNormal (this=0x7fc629658e70, node=0x7fc62002dc38) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:947 #10 0x00007fc62b7dc191 in Php::ExpressionVisitor::visitVarExpressionNormal (this=0x7fc629658890, node=0x1) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionvisitor.cpp:196 #11 0x00007fc62b5836a4 in Php::DefaultVisitor::visitUnaryExpressionNotPlusminus (this=0x7fc629658e70, node=0x7fc62002dbc8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:916 #12 0x00007fc62b7dcc7b in Php::ExpressionVisitor::visitUnaryExpression (this=0x7fc629658890, node=0x1) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionvisitor.cpp:509 #13 0x00007fc62b582d04 in Php::DefaultVisitor::visitMultiplicativeExpression (this=0x7fc629658890, node=0x7fc62002db48) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:588 #14 0x00007fc62b581d04 in Php::DefaultVisitor::visitAdditiveExpression (this=0x7fc629658890, node=0x7fc62002db18) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:11 #15 0x00007fc62b583084 in Php::DefaultVisitor::visitShiftExpression (this=0x7fc629658890, node=0x7fc62002dae8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:724 #16 0x00007fc62b582f9a in Php::DefaultVisitor::visitRelationalExpression (this=0x7fc629658890, node=0x7fc62002dab0) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:692 #17 0x00007fc62b582864 in Php::DefaultVisitor::visitEqualityExpression (this=0x7fc629658890, node=0x7fc62002da80) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:417 #18 0x00007fc62b581fad in Php::DefaultVisitor::visitBitAndExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:102 #19 0x00007fc62b58204d in Php::DefaultVisitor::visitBitXorExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:130 #20 0x00007fc62b581ffd in Php::DefaultVisitor::visitBitOrExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:116 #21 0x00007fc62b58209d in Php::DefaultVisitor::visitBooleanAndExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:144 #22 0x00007fc62b5820ed in Php::DefaultVisitor::visitBooleanOrExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:158 #23 0x00007fc62b58251e in Php::DefaultVisitor::visitConditionalExpression (this=0x7fc629658890, node=0x7fc62002d980) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:295 #24 0x00007fc62b7dd774 in Php::ExpressionVisitor::visitAssignmentExpression (this=0x7fc629658e70, node=0x7fc62002d940) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionvisitor.cpp:140 #25 0x00007fc62b582c2d in Php::DefaultVisitor::visitLogicalAndExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:546 #26 0x00007fc62b582ccd in Php::DefaultVisitor::visitLogicalXorExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:574 #27 0x00007fc62b582c7d in Php::DefaultVisitor::visitLogicalOrExpression (this=0x7fc629658e70, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:560 #28 0x00007fc62b7de79f in Php::ExpressionParser::evaluateType (this=0x7fc629658fc0, ast=0x7fc62002d870, editor=0x7fc62965a790, offset=@0x7fc629658f60) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionparser.cpp:93 #29 0x00007fc62b7deb08 in Php::ExpressionParser::evaluateType (this=0x1, ast=0x7fc629658a20, editor=0x1) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/expressionparser.cpp:78 #30 0x00007fc62b7d63d8 in Php::TypeBuilder::getTypeForNode (this=0x7fc62965a3e0, node=0x7fc62002d870) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/typebuilder.cpp:170 #31 0x00007fc62b7d665c in Php::TypeBuilder::visitExpr (this=0x7fc62965a3e0, node=0x7fc62002d870) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/typebuilder.cpp:316 #32 0x00007fc62b5832b7 in Php::DefaultVisitor::visitStatement (this=0x7fc62965a440, node=0x7fc62002d750) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:789 #33 0x00007fc62b7d7080 in Php::TypeBuilder::visitStatement (this=0x7fc62965a3e0, node=0x1) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/typebuilder.cpp:334 #34 0x00007fc62b7c9a2a in Php::DeclarationBuilder::visitStatement (this=0x7fc629658890, node=0x1) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/declarationbuilder.cpp:897 #35 0x00007fc62b5835b6 in Php::DefaultVisitor::visitTopStatement (this=0x7fc629658890, node=0x7fc62002d710) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:889 #36 0x00007fc62b7c52c1 in Php::DeclarationBuilder::visitTopStatement (this=0x7fc62965a3e0, node=0x7fc62002d710) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/declarationbuilder.cpp:587 #37 0x00007fc62b582b8d in Php::DefaultVisitor::visitInnerStatementList (this=0x7fc62965a440, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:525 #38 0x00007fc62b7d1178 in Php::ContextBuilder::visitClassStatement (this=0x7fc62965a3e0, node=0x7fc62002d5e8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/contextbuilder.cpp:206 #39 0x00007fc62b7d9ba4 in Php::TypeBuilder::visitClassStatement (this=0x7fc62965a3e0, node=0x7fc62002d5e8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/typebuilder.cpp:216 #40 0x00007fc62b7c7c6b in Php::DeclarationBuilder::visitClassStatement (this=0x7fc62965a3e0, node=0x7fc62002d5e8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/declarationbuilder.cpp:322 #41 0x00007fc62b58221d in Php::DefaultVisitor::visitClassBody (this=0x7fc62965a440, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:199 #42 0x00007fc62b7d14a0 in Php::ContextBuilder::visitClassDeclarationStatement (this=0x7fc62965a3e0, node=0x7fc62002d428) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/contextbuilder.cpp:170 #43 0x00007fc62b7cbb1f in Php::DeclarationBuilder::visitClassDeclarationStatement (this=0x7fc62965a3e0, node=0x7fc62002d428) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/declarationbuilder.cpp:151 #44 0x00007fc62b5835d0 in Php::DefaultVisitor::visitTopStatement (this=0x7fc62965a440, node=0x7fc62002d3e8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:891 #45 0x00007fc62b7c52c1 in Php::DeclarationBuilder::visitTopStatement (this=0x7fc62965a3e0, node=0x7fc62002d3e8) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/declarationbuilder.cpp:587 #46 0x00007fc62b582b8d in Php::DefaultVisitor::visitInnerStatementList (this=0x7fc62965a440, node=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/parser/generated/phpdefaultvisitor.cpp:525 #47 0x00007fc62b7d0cc6 in Php::ContextBuilder::startVisiting (this=0x7fc62965a3e0, node=0x35640a0) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/contextbuilder.cpp:101 #48 0x00007fc62b7cee8f in KDevelop::AbstractContextBuilder<Php::AstNode, Php::IdentifierAst>::supportBuild (context=<value optimized out>, node=<value optimized out>, this=<value optimized out>) at /usr/include/kde4/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:201 #49 KDevelop::AbstractTypeBuilder<Php::AstNode, Php::IdentifierAst, Php::ContextBuilder>::supportBuild (context=<value optimized out>, node=<value optimized out>, this=<value optimized out>) at /usr/include/kde4/kdevplatform/language/duchain/builders/abstracttypebuilder.h:85 #50 0x00007fc62b7cf016 in KDevelop::AbstractContextBuilder<Php::AstNode, Php::IdentifierAst>::build (this=0x7fc62965a3e0, url=<value optimized out>, node=0x35640a0, updateContext=<value optimized out>, useSmart=<value optimized out>) at /usr/include/kde4/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:155 #51 0x00007fc62b7c8c1d in Php::DeclarationBuilder::build (this=0x7fc62965a3e0, url=@0x7fc62965ad40, node=<value optimized out>, updateContext={m_topContext = 0x358f440}, useSmart=<value optimized out>) at /home/awagner/Sources/kdevelop4-extra-plugins/php/duchain/declarationbuilder.cpp:126 #52 0x00007fc62ba251e7 in Php::ParseJob::run (this=0x3559f40) at /home/awagner/Sources/kdevelop4-extra-plugins/php/phpparsejob.cpp:214 #53 0x0000003abae0befd in ?? () from /usr/lib64/libthreadweaver.so.4 #54 0x0000003abae0c1fe in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4 #55 0x0000003abae0b1ef in ?? () from /usr/lib64/libthreadweaver.so.4 #56 0x0000003abae0b658 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #57 0x0000003aabc59d45 in ?? () from /usr/lib64/libQtCore.so.4 #58 0x0000003aa100686a in start_thread () from /lib64/libpthread.so.0 #59 0x0000003aa04de3bd in clone () from /lib64/libc.so.6 #60 0x0000000000000000 in ?? () Thread 1 (Thread 0x7fc641a44820 (LWP 19555)): #0 0x0000003aa04d50d3 in poll () from /lib64/libc.so.6 #1 0x0000003aa240882a in ?? () from /usr/lib64/libxcb.so.1 #2 0x0000003aa2408d67 in ?? () from /usr/lib64/libxcb.so.1 #3 0x0000003aa2409015 in xcb_writev () from /usr/lib64/libxcb.so.1 #4 0x0000003aa204c8aa in _XSend () from /usr/lib64/libX11.so.6 #5 0x0000003aa204c9e9 in _XReply () from /usr/lib64/libX11.so.6 #6 0x0000003aa2040963 in XSync () from /usr/lib64/libX11.so.6 #7 0x0000003aac538c87 in QRasterWindowSurface::flush(QWidget*, QRegion const&, QPoint const&) () from /usr/lib64/libQtGui.so.4 #8 0x0000003aac553a11 in ?? () from /usr/lib64/libQtGui.so.4 #9 0x0000003aac554d14 in ?? () from /usr/lib64/libQtGui.so.4 #10 0x0000003aac555029 in ?? () from /usr/lib64/libQtGui.so.4 #11 0x0000003aac3ed5ea in ?? () from /usr/lib64/libQtGui.so.4 #12 0x0000003aac3fab1a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4 #13 0x0000003aac4227dc in ?? () from /usr/lib64/libQtGui.so.4 #14 0x0000003aa1c3919e in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #15 0x0000003aa1ee4598 in fflush () from /lib64/libglib-2.0.so.0 #16 0x0000000002011e20 in ?? () #17 0x0000003aac422470 in ?? () from /usr/lib64/libQtGui.so.4 #18 0x0000000000000000 in ?? () Reported using DrKonqi