Backtrace of KDevelop 4 C++ parser when running more than one thread at a time

Adam Treat treat at kde.org
Fri Aug 4 16:26:56 UTC 2006


Hi Roberto,

Here is the backtrace I promised you.  This crash happens when running 
multiple parse jobs in the threadweaver.  Doesn't happen when only running 
one thread at a time.

Like we discussed, either the initialization of the AST struct members isn't 
happening or perhaps this is all the 'grep "static " *' we find in the C++ 
parser.

If we can fix this I promise to revert all the hard coded AST member 
initializations in the parser that mattr, blackarrow and me have put in.  As 
we discussed, these should be initialized by the memorypool via memset 
although it might depend on some define (I don't think so, but I guess we'll 
see).

Cheers,

Adam
**********************************************************************

kdevelop (cpp support): ===-- PARSING --===> globalconfig.cpp <== 
readFromDisk: true size: 339
*** glibc detected *** realloc(): invalid next size: 0x08997ec8 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread 1120627632 (LWP 11167)]
0xffffe410 in __kernel_vsyscall ()
(gdb)
(gdb) (gdb) run
Undefined command: "".  Try "help".
(gdb) Starting program: /home/kde/install/regular/bin/kdevelop
Undefined command: "Starting".  Try "help".
(gdb) [Thread debugging using libthread_db enabled]
Undefined command: "".  Try "help".
(gdb) [New Thread 1109945696 (LWP 11050)]
Undefined command: "".  Try "help".
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x41f64541 in raise () from /lib/tls/libc.so.6
#2  0x41f65dbb in abort () from /lib/tls/libc.so.6
#3  0x41f9a8b5 in __libc_message () from /lib/tls/libc.so.6
#4  0x41fa0842 in malloc_printerr () from /lib/tls/libc.so.6
#5  0x41fa2617 in _int_realloc () from /lib/tls/libc.so.6
#6  0x41fa351e in realloc () from /lib/tls/libc.so.6
#7  0x4265e174 in CreateNode<NameAST> (memory_pool=0x8997ec8) at 
rxx_allocator.h:77
---Type <return> to continue, or q <return> to quit---
#8  0x426548a5 in Parser::parseName (this=0x42cb6234, node=@0x0, 
acceptTemplateId=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:321
#9  0x42659323 in Parser::parsePostfixExpressionInternal (this=0x42cb6234, 
node=@0x42cb5afc)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3419
#10 0x42656cf9 in Parser::parsePostfixExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3592
#11 0x42657473 in Parser::parseUnaryExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3690
---Type <return> to continue, or q <return> to quit---
#12 0x42657b05 in Parser::parseCastExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3861
#13 0x42657bb8 in Parser::parsePmExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3868
#14 0x42657c88 in Parser::parseMultiplicativeExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3896
#15 0x42657d48 in Parser::parseAdditiveExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3927
---Type <return> to continue, or q <return> to quit---
#16 0x42657df8 in Parser::parseShiftExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3955
#17 0x42657ece in Parser::parseRelationalExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3983
#18 0x42657fd1 in Parser::parseEqualityExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4014
#19 0x426580a1 in Parser::parseAndExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4043
---Type <return> to continue, or q <return> to quit---
#20 0x42658171 in Parser::parseExclusiveOrExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4071
#21 0x42658241 in Parser::parseInclusiveOrExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4099
#22 0x42658311 in Parser::parseLogicalAndExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4127
#23 0x426583e1 in Parser::parseLogicalOrExpression (this=0x42cb6234, 
node=@0x42cb5f38, templArgs=false)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4155
---Type <return> to continue, or q <return> to quit---
#24 0x426584aa in Parser::parseConditionalExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4183
#25 0x42658d3c in Parser::parseAssignmentExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4220
#26 0x42658e98 in Parser::parseCommaExpression (this=0x42cb6234, 
node=@0x42cb5f38)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:4259
#27 0x426594fc in Parser::parseExpressionStatement (this=0x42cb6234, 
node=@0x6)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:2427
---Type <return> to continue, or q <return> to quit---
#28 0x4265645d in Parser::parseExpressionOrDeclarationStatement 
(this=0x42cb6234, node=@0x42cb5ff8)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:2528
#29 0x426566dc in Parser::parseStatement (this=0x42cb6234, node=@0x42cb5ff8)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:2511
#30 0x426568dd in Parser::parseCompoundStatement (this=0x42cb6234, node=@0x0)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:2740
#31 0x4265ccae in Parser::parseFunctionBody (this=0x42cb6234, 
node=@0x42cb6064)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3243
---Type <return> to continue, or q <return> to quit---
#32 0x4265cfad in Parser::parseDeclarationInternal (this=0x42cb6234, 
node=@0x42cb6108)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:3203
#33 0x42655908 in Parser::parseDeclaration (this=0x42cb6234, node=@0x42cb6108)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:476
#34 0x4265dd9c in Parser::parseTranslationUnit (this=0x42cb6234, node=@0x0)
    at /home/kde/trunk/KDE/kdevelop/languages/cpp/parser/parser.cpp:385
#35 0x4265dfdc in Parser::parse (this=0x42cb6234,
    contents=0x43241018 ' ' <repeats 76 times>, "\n", ' ' <repeats 49 
times>, "\n", ' ' <repeats 50 times>, "\n", ' ' <repea---Type <return> to 
continue, or q <return> to quit---  




More information about the KDevelop-devel mailing list