[LLVMbugs] [Bug 3136] New: clang crashes

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Nov 26 13:44:41 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=3136

           Summary: clang crashes
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rdivacky at freebsd.org
                CC: llvmbugs at cs.uiuc.edu


clang crashes with this:

#0  0x08796206 in clang::ArrayType::getElementType (this=0x0) at Type.h:690
690       QualType getElementType() const { return ElementType; }
[New Thread 9001140 (LWP 100114)]
(gdb) bt
#0  0x08796206 in clang::ArrayType::getElementType (this=0x0) at Type.h:690
#1  0x0889d70b in clang::Sema::IsStringLiteralInit (this=0xbfbfe470,
Init=0x905e3c0, DeclType={ThePtr = 151073504}) at SemaDecl.cpp:670
#2  0x0889daa2 in clang::Sema::CheckInitializerTypes (this=0xbfbfe470,
Init=@0xbfbfd2b0, DeclType=@0xbfbfd2ac, InitLoc={ID = 2147510311}, InitEntity=
      {Ptr = 151623808}) at SemaDecl.cpp:695
#3  0x0889e0ab in clang::Sema::AddInitializerToDecl (this=0xbfbfe470,
dcl=0x90a1d30, init=0x905e3c0) at SemaDecl.cpp:1760
#4  0x0898343b in clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator
(this=0xbfbfe648, D=@0xbfbfd420) at ParseDecl.cpp:295
#5  0x089838b3 in clang::Parser::ParseSimpleDeclaration (this=0xbfbfe648,
Context=5) at ParseDecl.cpp:236
#6  0x08983934 in clang::Parser::ParseDeclaration (this=0xbfbfe648, Context=5)
at ParseDecl.cpp:213
#7  0x0899892e in clang::Parser::ParseStatementOrDeclaration (this=0xbfbfe648,
OnlyStatement=false) at ParseStmt.cpp:101
#8  0x0899b100 in clang::Parser::ParseCompoundStatementBody (this=0xbfbfe648,
isStmtExpr=true) at ParseStmt.cpp:363
#9  0x0899b605 in clang::Parser::ParseCompoundStatement (this=0xbfbfe648,
isStmtExpr=true) at ParseStmt.cpp:341
#10 0x089890c2 in clang::Parser::ParseParenExpression (this=0xbfbfe648,
ExprType=@0xbfbfd930, CastTy=@0xbfbfd92c, RParenLoc=@0xbfbfd924)
    at ParseExpr.cpp:1046
#11 0x0898a832 in clang::Parser::ParseCastExpression (this=0xbfbfe648,
isUnaryExpression=false) at ParseExpr.cpp:453
#12 0x0898af29 in clang::Parser::ParseCastExpression (this=0xbfbfe648,
isUnaryExpression=false) at ParseExpr.cpp:557
#13 0x08988036 in clang::Parser::ParseExpression (this=0xbfbfe648) at
ParseExpr.cpp:176
#14 0x089893c7 in clang::Parser::ParseParenExpression (this=0xbfbfe648,
ExprType=@0xbfbfddb0, CastTy=@0xbfbfddac, RParenLoc=@0xbfbfdda4)
    at ParseExpr.cpp:1082
#15 0x0898a832 in clang::Parser::ParseCastExpression (this=0xbfbfe648,
isUnaryExpression=false) at ParseExpr.cpp:453
#16 0x08988036 in clang::Parser::ParseExpression (this=0xbfbfe648) at
ParseExpr.cpp:176
#17 0x08998480 in clang::Parser::ParseReturnStatement (this=0xbfbfe648) at
ParseStmt.cpp:1013
#18 0x08998ca5 in clang::Parser::ParseStatementOrDeclaration (this=0xbfbfe648,
OnlyStatement=false) at ParseStmt.cpp:159
#19 0x0899b100 in clang::Parser::ParseCompoundStatementBody (this=0xbfbfe648,
isStmtExpr=false) at ParseStmt.cpp:363
#20 0x0899b4ea in clang::Parser::ParseFunctionStatementBody (this=0xbfbfe648,
Decl=0x9006e80, L={ID = 1446241}, R={ID = 1446241}) at ParseStmt.cpp:1240
#21 0x089797be in clang::Parser::ParseFunctionDefinition (this=0xbfbfe648,
D=@0xbfbfe230) at Parser.cpp:527
#22 0x08979dc5 in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0xbfbfe648) at Parser.cpp:451
#23 0x0897a0fb in clang::Parser::ParseExternalDeclaration (this=0xbfbfe648) at
Parser.cpp:355
#24 0x0897a165 in clang::Parser::ParseTopLevelDecl (this=0xbfbfe648,
Result=@0xbfbfe700) at Parser.cpp:278
#25 0x08894df6 in clang::ParseAST (PP=@0x9001280, Consumer=0x9006340,
PrintStats=false, FreeMemory=true) at ParseAST.cpp:55
#26 0x085b7362 in ProcessInputFile (PP=@0x9001280, PPF=@0xbfbfea3c,
InFile=@0x90070a8, PA=EmitBC) at clang.cpp:1347
#27 0x085b91a2 in main (argc=16, argv=0xbfbfeb10) at clang.cpp:1545
(gdb) 

on the attached example


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list