[LLVMbugs] [Bug 4894] Crash while emitting debug information for complex Objective-C classes

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Nov 14 10:30:52 PST 2009


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


David Chisnall <csdavec at swan.ac.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #9 from David Chisnall <csdavec at swan.ac.uk>  2009-11-14 12:30:51 ---
This bug went away for a bit, but it seems to have reappeared with recent
versions.  There seem to be a couple of problems.  The original test case that
I uploaded now crashes with a failure in new, and this trace:

#0  0x2974ede7 in kill () from /lib/libc.so.7
#1  0x29540347 in raise () from /lib/libthr.so.3
#2  0x2974d91a in abort () from /lib/libc.so.7
#3  0x295b3ce0 in __gnu_cxx::__verbose_terminate_handler () from
/usr/lib/libstdc++.so.6
#4  0x295b84ea in std::set_unexpected () from /usr/lib/libstdc++.so.6
#5  0x295b8532 in std::terminate () from /usr/lib/libstdc++.so.6
#6  0x295b842a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7  0x2960d37e in operator new () from /usr/lib/libstdc++.so.6
#8  0x09201a68 in llvm::MDNode::get (Context=@0x298070ac, Vals=0xbfbfaf20,
NumVals=10)
    at Metadata.cpp:86
#9  0x090f290e in llvm::DIFactory::CreateDerivedType (this=0x29840788, Tag=13,
Context=
      {DbgNode = 0x29f47ca0}, Name=0x29dd92cc "_view", CompileUnit=@0xbfbfb0e8,
LineNumber=335, 
    SizeInBits=32, AlignInBits=32, OffsetInBits=96, Flags=2,
DerivedFrom=@0xbfbfb0e0)
    at DebugInfo.cpp:764
#10 0x081debc0 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29c7b480, 
    Unit=@0xbfbfb1cc) at CGDebugInfo.cpp:681
#11 0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 700953728}}, Unit=@0xbfbfb298) at CGDebugInfo.cpp:864
#12 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 700953728}}, Unit=@0xbfbfb308) at CGDebugInfo.cpp:832
#13 0x081e110c in clang::CodeGen::CGDebugInfo::CreatePointerLikeType
(this=0x29840780, Tag=15, 
    Ty=0x29c7b4c0, PointeeTy={Value = {Value = 700953728}}, Unit=@0xbfbfb37c)
    at CGDebugInfo.cpp:263
#14 0x081e13d1 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29c7b4c0, 
    Unit=@0xbfbfb3d4) at CGDebugInfo.cpp:248
#15 0x081d9ebf in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 700953792}}, Unit=@0xbfbfb4a8) at CGDebugInfo.cpp:862
#16 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 700953792}}, Unit=@0xbfbfb620) at CGDebugInfo.cpp:832
#17 0x081de8f3 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29c7b0a0, 
    Unit=@0xbfbfb72c) at CGDebugInfo.cpp:637
#18 0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 700952736}}, Unit=@0xbfbfb7f8) at CGDebugInfo.cpp:864
#19 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 700952736}}, Unit=@0xbfbfb950) at CGDebugInfo.cpp:832
#20 0x081de718 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29c59d28, 
    Unit=@0xbfbfba7c) at CGDebugInfo.cpp:623
#21 0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 700816680}}, Unit=@0xbfbfbb48) at CGDebugInfo.cpp:864
#22 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 700816680}}, Unit=@0xbfbfbbb8) at CGDebugInfo.cpp:832
#23 0x081e110c in clang::CodeGen::CGDebugInfo::CreatePointerLikeType
(this=0x29840780, Tag=15, 
    Ty=0x29c59d68, PointeeTy={Value = {Value = 700816680}}, Unit=@0xbfbfbc2c)
    at CGDebugInfo.cpp:263
#24 0x081e13d1 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29c59d68, 
    Unit=@0xbfbfbc84) at CGDebugInfo.cpp:248
#25 0x081d9ebf in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 700816744}}, Unit=@0xbfbfbd58) at CGDebugInfo.cpp:862
#26 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 700816744}}, Unit=@0xbfbfbed0) at CGDebugInfo.cpp:832
#27 0x081de8f3 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29ea8370, 
    Unit=@0xbfbfbfdc) at CGDebugInfo.cpp:637
#28 0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 703234928}}, Unit=@0xbfbfc0a8) at CGDebugInfo.cpp:864
#29 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 703234928}}, Unit=@0xbfbfc200) at CGDebugInfo.cpp:832
#30 0x081de718 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29fba498, 
    Unit=@0xbfbfc32c) at CGDebugInfo.cpp:623
#31 0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 704357528}}, Unit=@0xbfbfc3f8) at CGDebugInfo.cpp:864
#32 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 704357528}}, Unit=@0xbfbfc468) at CGDebugInfo.cpp:832
#33 0x081e110c in clang::CodeGen::CGDebugInfo::CreatePointerLikeType
(this=0x29840780, Tag=15, 
    Ty=0x29fba4d8, PointeeTy={Value = {Value = 704357528}}, Unit=@0xbfbfc4dc)
    at CGDebugInfo.cpp:263
#34 0x081e13d1 in clang::CodeGen::CGDebugInfo::CreateType (this=0x29840780,
Ty=0x29fba4d8, 
    Unit=@0xbfbfc534) at CGDebugInfo.cpp:248
#35 0x081d9ebf in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x29840780,
Ty=
        {Value = {Value = 704357592}}, Unit=@0xbfbfc608) at CGDebugInfo.cpp:862
#36 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x29840780, Ty=
        {Value = {Value = 704357592}}, Unit=@0xbfbfc76c) at CGDebugInfo.cpp:832
#37 0x081dc641 in clang::CodeGen::CGDebugInfo::EmitDeclare (this=0x29840780,
Decl=0x29fba550, 
    Tag=256, Storage=0x29fdd54c, Builder=@0xbfbfd424) at CGDebugInfo.cpp:1004
#38 0x081dde6a in clang::CodeGen::CGDebugInfo::EmitDeclareOfAutoVariable
(this=0x29840780, 
    Decl=0x29fba550, Storage=0x29fdd54c, Builder=@0xbfbfd424) at
CGDebugInfo.cpp:1366

#39 0x081e9a2d in clang::CodeGen::CodeGenFunction::EmitLocalBlockVarDecl
(this=0xbfbfd3a0, 
    D=@0x29fba550) at CGDecl.cpp:414
#40 0x081ea82f in clang::CodeGen::CodeGenFunction::EmitBlockVarDecl
(this=0xbfbfd3a0, 
    D=@0x29fba550) at CGDecl.cpp:72
#41 0x081ea971 in clang::CodeGen::CodeGenFunction::EmitDecl (this=0xbfbfd3a0,
D=@0x29fba550)
    at CGDecl.cpp:49
#42 0x08254075 in clang::CodeGen::CodeGenFunction::EmitDeclStmt
(this=0xbfbfd3a0, S=@0x29fba6c0)
    at CGStmt.cpp:555
#43 0x08255aee in clang::CodeGen::CodeGenFunction::EmitSimpleStmt
(this=0xbfbfd3a0, S=0x29fba6c0)
    at CGStmt.cpp:129
#44 0x08254155 in clang::CodeGen::CodeGenFunction::EmitStmt (this=0xbfbfd3a0,
S=0x29fba6c0)
    at CGStmt.cpp:43
#45 0x082558cf in clang::CodeGen::CodeGenFunction::EmitCompoundStmt
(this=0xbfbfd3a0, 
    S=@0x29fba740, GetLast=false, AggLoc=0x0, isAggVol=false) at CGStmt.cpp:162
#46 0x08255acc in clang::CodeGen::CodeGenFunction::EmitSimpleStmt
(this=0xbfbfd3a0, S=0x29fba740)
    at CGStmt.cpp:128
#47 0x08254155 in clang::CodeGen::CodeGenFunction::EmitStmt (this=0xbfbfd3a0,
S=0x29fba740)
    at CGStmt.cpp:43
#48 0x082556d5 in clang::CodeGen::CodeGenFunction::EmitIfStmt (this=0xbfbfd3a0,
S=@0x29fba770)
    at CGStmt.cpp:326
#49 0x0825433b in clang::CodeGen::CodeGenFunction::EmitStmt (this=0xbfbfd3a0,
S=0x29fba770)
    at CGStmt.cpp:89
#50 0x082558cf in clang::CodeGen::CodeGenFunction::EmitCompoundStmt
(this=0xbfbfd3a0, 
    S=@0x29fba790, GetLast=false, AggLoc=0x0, isAggVol=false) at CGStmt.cpp:162
#51 0x08255acc in clang::CodeGen::CodeGenFunction::EmitSimpleStmt
(this=0xbfbfd3a0, S=0x29fba790)
    at CGStmt.cpp:128
#52 0x08254155 in clang::CodeGen::CodeGenFunction::EmitStmt (this=0xbfbfd3a0,
S=0x29fba790)
    at CGStmt.cpp:43
#53 0x082556d5 in clang::CodeGen::CodeGenFunction::EmitIfStmt (this=0xbfbfd3a0,
S=@0x29fba7c0)
    at CGStmt.cpp:326
#54 0x0825433b in clang::CodeGen::CodeGenFunction::EmitStmt (this=0xbfbfd3a0,
S=0x29fba7c0)
    at CGStmt.cpp:89
#55 0x082558cf in clang::CodeGen::CodeGenFunction::EmitCompoundStmt
(this=0xbfbfd3a0, 
    S=@0x29fba7e0, GetLast=false, AggLoc=0x0, isAggVol=false) at CGStmt.cpp:162
#56 0x08255acc in clang::CodeGen::CodeGenFunction::EmitSimpleStmt
(this=0xbfbfd3a0, S=0x29fba7e0)
    at CGStmt.cpp:128
#57 0x08254155 in clang::CodeGen::CodeGenFunction::EmitStmt (this=0xbfbfd3a0,
S=0x29fba7e0)
    at CGStmt.cpp:43
#58 0x0821d996 in clang::CodeGen::CodeGenFunction::GenerateObjCMethod
(this=0xbfbfd3a0, 
    OMD=0x29fba100) at CGObjC.cpp:134
#59 0x0819b83d in clang::CodeGen::CodeGenModule::EmitTopLevelDecl
(this=0x29812200, D=0x29fba100)
    at CodeGenModule.cpp:1753
#60 0x081951d0 in HandleTopLevelDecl (this=0x298068c0, DG={D = 0x29fba100}) at
ModuleBuilder.cpp:67
#61 0x08169da0 in HandleTopLevelDecl (this=0x29857200, D={D = 0x29fba100}) at
Backend.cpp:130
#62 0x08389d7a in clang::ParseAST (PP=@0x298611c0, Consumer=0x29857200,
Ctx=@0x2988a400, 
    PrintStats=false, CompleteTranslationUnit=true, CompletionConsumer=0x0) at
ParseAST.cpp:72
#63 0x080920aa in clang::ASTFrontendAction::ExecuteAction (this=0x2980a8c0)
    at FrontendAction.cpp:218
#64 0x08092196 in clang::FrontendAction::Execute (this=0x2980a8c0) at
FrontendAction.cpp:148
#65 0x08087d82 in main (argc=61, argv=0xbfbfe068) at clang-cc.cpp:377

In another example I now get a failure that the debug info generator now
attempts to replace one value with a value of a different type, giving this
trace:


#4  0x0923788d in llvm::Value::replaceAllUsesWith (this=0x29fb10a0,
New=0x2a111670)
    at Value.cpp:332
#5  0x090f3b6b in llvm::DIDerivedType::replaceAllUsesWith (this=0xbfbfc704,
D=@0xbfbfc6fc)
    at DebugInfo.cpp:304
#6  0x081dee43 in clang::CodeGen::CGDebugInfo::CreateType (this=0x298406c0,
Ty=0x29c53e68, 
    Unit=@0xbfbfc86c) at CGDebugInfo.cpp:702
#7  0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x298406c0,
Ty=
        {Value = {Value = 700792424}}, Unit=@0xbfbfc938) at CGDebugInfo.cpp:864
#8  0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x298406c0, Ty=
        {Value = {Value = 700792424}}, Unit=@0xbfbfca90) at CGDebugInfo.cpp:832
#9  0x081de718 in clang::CodeGen::CGDebugInfo::CreateType (this=0x298406c0,
Ty=0x29fa6bb0, 
    Unit=@0xbfbfcbbc) at CGDebugInfo.cpp:623
#10 0x081d9f17 in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x298406c0,
Ty=
        {Value = {Value = 704277424}}, Unit=@0xbfbfcc88) at CGDebugInfo.cpp:864
#11 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x298406c0, Ty=
        {Value = {Value = 704277424}}, Unit=@0xbfbfccf8) at CGDebugInfo.cpp:832
#12 0x081e110c in clang::CodeGen::CGDebugInfo::CreatePointerLikeType
(this=0x298406c0, Tag=15, 
    Ty=0x29fa6bf0, PointeeTy={Value = {Value = 704277424}}, Unit=@0xbfbfcd6c)
    at CGDebugInfo.cpp:263
#13 0x081e13d1 in clang::CodeGen::CGDebugInfo::CreateType (this=0x298406c0,
Ty=0x29fa6bf0, 
    Unit=@0xbfbfcdc4) at CGDebugInfo.cpp:248
#14 0x081d9ebf in clang::CodeGen::CGDebugInfo::CreateTypeNode (this=0x298406c0,
Ty=
        {Value = {Value = 704277488}}, Unit=@0xbfbfce98) at CGDebugInfo.cpp:862
#15 0x081da587 in clang::CodeGen::CGDebugInfo::getOrCreateType
(this=0x298406c0, Ty=
        {Value = {Value = 704277488}}, Unit=@0xbfbfcffc) at CGDebugInfo.cpp:832
#16 0x081dc641 in clang::CodeGen::CGDebugInfo::EmitDeclare (this=0x298406c0,
Decl=0x29fa84e0, 
    Tag=257, Storage=0x29f3f8cc, Builder=@0xbfbfd644) at CGDebugInfo.cpp:1004
#17 0x081dde2a in clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable
(this=0x298406c0, 
    Decl=0x29fa84e0, AI=0x29f3f8cc, Builder=@0xbfbfd644) at
CGDebugInfo.cpp:1379
#18 0x081e84de in clang::CodeGen::CodeGenFunction::EmitParmDecl
(this=0xbfbfd5c0, D=@0x29fa84e0, 
    Arg=0x29f3cf10) at CGDecl.cpp:611
#19 0x081d4388 in clang::CodeGen::CodeGenFunction::EmitFunctionProlog
(this=0xbfbfd5c0, 
    FI=@0x2980aee0, Fn=0x29f4cba0, Args=@0xbfbfd470) at CGCall.cpp:636
#20 0x0826ccd0 in clang::CodeGen::CodeGenFunction::StartFunction
(this=0xbfbfd5c0, GD=
        {Value = {Value = 704283728}}, RetTy={Value = {Value = 696770616}},
Fn=0x29f4cba0, 
    Args=@0xbfbfd470, StartLoc={ID = 394}) at CodeGenFunction.cpp:206
#21 0x0821c597 in clang::CodeGen::CodeGenFunction::StartObjCMethod
(this=0xbfbfd5c0, 
    OMD=0x29fa8450, CD=0x29fa6860) at CGObjC.cpp:124
#22 0x0821d975 in clang::CodeGen::CodeGenFunction::GenerateObjCMethod
(this=0xbfbfd5c0, 
    OMD=0x29fa8450) at CGObjC.cpp:133
#23 0x0819b83d in clang::CodeGen::CodeGenModule::EmitTopLevelDecl
(this=0x29812200, D=0x29fa8450)
    at CodeGenModule.cpp:1753
#24 0x081951d0 in HandleTopLevelDecl (this=0x29806680, DG={D = 0x29fa8450}) at
ModuleBuilder.cpp:67
#25 0x08169da0 in HandleTopLevelDecl (this=0x29857200, D={D = 0x29fa8450}) at
Backend.cpp:130
#26 0x08389d7a in clang::ParseAST (PP=@0x298621c0, Consumer=0x29857200,
Ctx=@0x2988b400, 
    PrintStats=false, CompleteTranslationUnit=true, CompletionConsumer=0x0) at
ParseAST.cpp:72
#27 0x080920aa in clang::ASTFrontendAction::ExecuteAction (this=0x2980a840)
    at FrontendAction.cpp:218
#28 0x08092196 in clang::FrontendAction::Execute (this=0x2980a840) at
FrontendAction.cpp:148
#29 0x08087d82 in main (argc=52, argv=0xbfbfe284) at clang-cc.cpp:377


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