[LLVMbugs] [Bug 4541] New: crash with -g

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Jul 11 18:43:04 PDT 2009


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

           Summary: crash with -g
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


The attached .mi crashes when compiled with debug info. The problem looks like
a double free, and it is very susceptible to changes in the input. valgrind may
come in handy.
--
ddunbar at giles:delta$ gcc -w -c t.mi
ddunbar at giles:delta$ clang -w -c t.mi
ddunbar at giles:delta$ clang -w -g -c t.mi
0   clang-cc          0x0000000100bbda15 PrintStackTrace(void*) + 38
1   clang-cc          0x0000000100bbdf25 SignalHandler(int) + 288
2   libSystem.B.dylib 0x00007fff84b3c2fa _sigtramp + 26
3   libSystem.B.dylib 0x0000000102711ab8 _sigtramp + 2109560792
4   clang-cc          0x00000001007c9bb0 llvm::PATypeHolder::get() const + 24
5   clang-cc          0x00000001007c9bf5 llvm::PATypeHolder::operator
llvm::Type*() const + 21
6   clang-cc          0x00000001007c9c11 llvm::Value::getType() const + 25
7   clang-cc          0x0000000100adebca
llvm::ConstantExpr::getBitCast(llvm::Constant*, llvm::Type const*) + 26
8   clang-cc          0x0000000100b32af1
llvm::LLVMContext::getConstantExprBitCast(llvm::Constant*, llvm::Type const*) +
33
9   clang-cc          0x0000000100a6225b
llvm::DIFactory::getCastToEmpty(llvm::DIDescriptor) + 85
10  clang-cc          0x0000000100a635f5
llvm::DIFactory::CreateDerivedType(unsigned int, llvm::DIDescriptor,
std::string const&, llvm::DICompileUnit, unsigned int, unsigned long long,
unsigned long long, unsigned long long, unsigned int, llvm::DIType) + 405
11  clang-cc          0x00000001001002e1
clang::CodeGen::CGDebugInfo::CreateType(clang::ObjCInterfaceType const*,
llvm::DICompileUnit) + 897
12  clang-cc          0x00000001000fee4e
clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType,
llvm::DICompileUnit) + 566
13  clang-cc          0x00000001000ff7fb
clang::CodeGen::CGDebugInfo::EmitDeclare(clang::VarDecl const*, unsigned int,
llvm::Value*, llvm::IRBuilder<true, llvm::ConstantFolder>&) + 229
14  clang-cc          0x00000001000ff989
clang::CodeGen::CGDebugInfo::EmitDeclareOfAutoVariable(clang::VarDecl const*,
llvm::Value*, llvm::IRBuilder<true, llvm::ConstantFolder>&) + 53
15  clang-cc          0x00000001001067e6
clang::CodeGen::CodeGenFunction::EmitLocalBlockVarDecl(clang::VarDecl const&) +
1828
16  clang-cc          0x0000000100107771
clang::CodeGen::CodeGenFunction::EmitBlockVarDecl(clang::VarDecl const&) + 157
17  clang-cc          0x00000001001078da
clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&) + 310
18  clang-cc          0x0000000100154d66
clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&) + 60
19  clang-cc          0x00000001001557a6
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 512
20  clang-cc          0x0000000100156871
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, llvm::Value*, bool) + 301
21  clang-cc          0x0000000100156a76
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 190
22  clang-cc          0x00000001001555f4
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 78
23  clang-cc          0x000000010012a2e1
clang::CodeGen::CodeGenFunction::GenerateObjCMethod(clang::ObjCMethodDecl
const*) + 161
24  clang-cc          0x000000010016489c
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 892
25  clang-cc          0x000000010017693a (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 76
26  clang-cc          0x000000010003c14d (anonymous
namespace)::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 139
27  clang-cc          0x00000001002378b4 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool) + 478
28  clang-cc          0x000000010002871e ProcessInputFile(clang::Preprocessor&,
clang::PreprocessorFactory&, std::string const&, ProgActions,
llvm::StringMap<bool, llvm::MallocAllocator> const&, llvm::LLVMContext&) + 4175
29  clang-cc          0x000000010002a0aa main + 2877
30  clang-cc          0x0000000100024680 start + 52
31  clang-cc          0x0000000000000017 start + 4294818251
Stack dump:
0.      Program arguments: /Users/ddunbar/llvm/Debug/bin/clang-cc -triple
x86_64-apple-darwin10 -S -disable-free -main-file-name t.mi --relocation-model
pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --mcpu=core2
--fmath-errno=0 -mmacosx-version-min=10.6.0 -g -w -fdiagnostics-show-option -o
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-/cc-e8Z42k.s -x
objective-c-cpp-output t.mi 
1.      t.mi:14:1: current parser token '@'
2.      t.mi:11:1: LLVM IR generation of declaration
'CYObjectsController::attributedStringWithString:image:'
3.      t.mi:11:87: LLVM IR generation of compound statement ('{}')
clang: error: compiler command failed due to signal 11 (use -v to see
invocation)
--


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