[LLVMbugs] [Bug 6746] New: Crash after missing header

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 30 20:00:52 PDT 2010


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

           Summary: Crash after missing header
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: crash-on-invalid
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jyasskin at google.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


As of r99978:


(gdb) run
Starting program: /Users/jyasskin/src/llvm/clang/obj/Debug/bin/clang -cc1
-triple i386-apple-darwin9.0.0 -S -disable-free -main-file-name DeclCXX.cpp
-pic-level 1 -mdisable-fp-elim -target-cpu yonah -resource-dir
/Users/jyasskin/src/llvm/clang/obj/Debug/lib/clang/1.5 -I
../src/tools/clang/include/ -fmessage-length 225 -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/zz/zzzivhrRnAmviuee+++ph+++BPE/-Tmp-/cc-x5SK56.s -x c++
../src/tools/clang/lib/AST/DeclCXX.cpp
Reading symbols for shared libraries +++. done
In file included from ../src/tools/clang/lib/AST/DeclCXX.cpp:14:
In file included from ../src/tools/clang/include/clang/AST/DeclCXX.h:18:
In file included from ../src/tools/clang/include/clang/AST/Expr.h:17:
../src/tools/clang/include/clang/AST/APValue.h:17:10: fatal error:
'llvm/ADT/APSInt.h' file not found
#include "llvm/ADT/APSInt.h"
         ^
Assertion failed: (RefCount >= 1 && "Referencing already-destroyed
statement!"), function getStmtClass, file
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/AST/../../include/clang/AST/Stmt.h,
line 203.

Program received signal SIGABRT, Aborted.
0x92c4ee42 in __kill ()
(gdb) bt
#0  0x92c4ee42 in __kill ()
#1  0x92c4ee34 in kill$UNIX2003 ()
#2  0x92cc123a in raise ()
#3  0x92ccd679 in abort ()
#4  0x92cc23db in __assert_rtn ()
#5  0x004fc41f in clang::Stmt::getStmtClass (this=0x3dff1d0) at Stmt.h:203
#6  0x00496f45 in clang::DeclStmt::classof (T=0x3dff1d0) at Stmt.h:333
#7  0x0049ca45 in llvm::isa_impl<clang::DeclStmt, clang::Stmt>::doit
(Val=@0x3dff1d0) at Casting.h:55
#8  0x004afc75 in llvm::isa_impl_wrap<clang::DeclStmt, clang::Stmt const,
clang::Stmt const>::doit (Val=@0x3dff1d0) at Casting.h:73
#9  0x0049ca5d in llvm::isa_impl_cl<clang::Stmt>::isa<clang::DeclStmt>
(Val=@0x3dff1d0) at Casting.h:85
#10 0x004afc8d in llvm::isa_impl_cl<clang::Stmt*>::isa<clang::DeclStmt>
(Val=0x3dff1d0) at Casting.h:103
#11 0x0049ca77 in llvm::isa<clang::DeclStmt, clang::Stmt*> (Val=@0xbfffcde4) at
Casting.h:118
#12 0x0058781d in llvm::dyn_cast<clang::DeclStmt, clang::Stmt*>
(Val=@0xbfffcde4) at Casting.h:228
#13 0x0022501f in (anonymous
namespace)::JumpScopeChecker::BuildScopeInformation (this=0xbfffd010,
S=0x3dff290, ParentScope=0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/JumpDiagnostics.cpp:128
#14 0x0022550c in (anonymous
namespace)::JumpScopeChecker::BuildScopeInformation (this=0xbfffd010,
S=0x3dff2c8, ParentScope=0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/JumpDiagnostics.cpp:215
#15 0x002255e0 in (anonymous namespace)::JumpScopeChecker::JumpScopeChecker
(this=0xbfffd010, Body=0x3dff2c8, s=@0xbfffe230) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/JumpDiagnostics.cpp:72
#16 0x00225613 in clang::Sema::DiagnoseInvalidJumps (this=0xbfffe230,
Body=0x3dff2c8) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/JumpDiagnostics.cpp:332
#17 0x00270e19 in clang::Sema::ActOnFinishFunctionBody (this=0xbfffe230, D={Ptr
= 0x3dfee40}, BodyArg=@0xbfffd4cc, IsInstantiation=false) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/SemaDecl.cpp:4405
#18 0x0027103b in clang::Sema::ActOnFinishFunctionBody (this=0xbfffe230, D={Ptr
= 0x3dfee40}, BodyArg=@0xbfffd56c) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/SemaDecl.cpp:4309
#19 0x005e584a in clang::Parser::ParseFunctionStatementBody (this=0xbfffe900,
Decl={Ptr = 0x3dfee40}) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseStmt.cpp:1441
#20 0x005a7bf1 in clang::Parser::ParseLexedMethodDefs (this=0xbfffe900,
Class=@0x3378bd0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:226
#21 0x005bc51d in clang::Parser::ParseCXXMemberSpecification (this=0xbfffe900,
RecordLoc={ID = 1931916}, TagType=16, TagDecl={Ptr = 0x3dfa010}) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseDeclCXX.cpp:1600
#22 0x005bd8c0 in clang::Parser::ParseClassSpecifier (this=0xbfffe900,
TagTokKind=clang::tok::kw_class, StartLoc={ID = 1931916}, DS=@0xbfffdd5c,
TemplateInfo=@0xbfffdcf8, AS=clang::AS_none, SuppressDeclarations=false) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseDeclCXX.cpp:910
#23 0x005b0054 in clang::Parser::ParseDeclarationSpecifiers (this=0xbfffe900,
DS=@0xbfffdd5c, TemplateInfo=@0xbfffdcf8, AS=clang::AS_none,
DSContext=clang::Parser::DSC_top_level) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseDecl.cpp:1302
#24 0x005ee38f in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0xbfffe900, DS=@0xbfffdd5c, Attr=0x0, AS=clang::AS_none) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:535
#25 0x005ee770 in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0xbfffe900, Attr=0x0, AS=clang::AS_none) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:590
#26 0x005ef550 in clang::Parser::ParseExternalDeclaration (this=0xbfffe900,
Attr={AttrList = 0x0, Range = {B = {ID = 0}, E = {ID = 0}}, HasAttr = false})
at /Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:479
#27 0x005b9861 in clang::Parser::ParseNamespace (this=0xbfffe900, Context=0,
DeclEnd=@0xbfffe0c0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseDeclCXX.cpp:105
#28 0x005b3086 in clang::Parser::ParseDeclaration (this=0xbfffe900, Context=0,
DeclEnd=@0xbfffe0c0, Attr={AttrList = 0x0, Range = {B = {ID = 0}, E = {ID =
0}}, HasAttr = false}) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseDecl.cpp:325
#29 0x005ef459 in clang::Parser::ParseExternalDeclaration (this=0xbfffe900,
Attr={AttrList = 0x0, Range = {B = {ID = 0}, E = {ID = 0}}, HasAttr = false})
at /Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:461
#30 0x005ef68e in clang::Parser::ParseTopLevelDecl (this=0xbfffe900,
Result=@0xbfffea2c) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:351
#31 0x002265ab in clang::ParseAST (PP=@0x33026a0, Consumer=0x3304ed0,
Ctx=@0x3824000, PrintStats=false, CompleteTranslationUnit=true,
CompletionConsumer=0x0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/ParseAST.cpp:68
#32 0x000406c4 in clang::ASTFrontendAction::ExecuteAction (this=0x3301ed0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Frontend/FrontendAction.cpp:223
#33 0x000405b4 in clang::FrontendAction::Execute (this=0x3301ed0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Frontend/FrontendAction.cpp:149
#34 0x00021a23 in clang::CompilerInstance::ExecuteAction (this=0x3301980,
Act=@0x3301ed0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Frontend/CompilerInstance.cpp:510
#35 0x000035bb in cc1_main (ArgBegin=0xbffff270, ArgEnd=0xbffff2d4,
Argv0=0xbffff384 "/Users/jyasskin/src/llvm/clang/obj/Debug/bin/clang",
MainAddr=0x61ae) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/tools/driver/cc1_main.cpp:271
#36 0x00006f3f in main (argc=27, argv=0xbffff268) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/tools/driver/driver.cpp:181
(gdb)

-- 
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