[LLVMbugs] [Bug 9914] New: Clang crashes in Globals.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 14 05:17:27 PDT 2011


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

           Summary: Clang crashes in Globals.cpp
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: js-llvm-bugzilla at webkeks.org
                CC: llvmbugs at cs.uiuc.edu


Assertion failed: (InitVal->getType() == Ty && "Initializer should be the same
type as the GlobalVariable!"), function GlobalVariable, file Globals.cpp, line
97.
0  clang             0x00000001016e9a32
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
818
1  clang             0x00000001016ea9b3
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
4787
2  libSystem.B.dylib 0x00007fff88f0b66a _sigtramp + 26
3  libSystem.B.dylib 0x0000000102983ce0 _sigtramp + 2041022096
4  clang             0x00000001016e9eb2
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
1970
5  clang             0x00000001015db0be
llvm::GVMaterializer::Dematerialize(llvm::GlobalValue*) + 6014
6  clang             0x00000001002616d5 llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateStructGEP(llvm::Value*, unsigned int, llvm::Twine const&) + 47477
7  clang             0x000000010026180f llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateStructGEP(llvm::Value*, unsigned int, llvm::Twine const&) + 47791
8  clang             0x0000000100239f60 llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateFCmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine
const&) + 24400
9  clang             0x000000010022ae02
clang::CodeGen::CGRecordLayout::getNonVirtualBaseLLVMFieldNo(clang::CXXRecordDecl
const*) const + 45906
10 clang             0x000000010022b8dd
clang::CodeGen::CGRecordLayout::getNonVirtualBaseLLVMFieldNo(clang::CXXRecordDecl
const*) const + 48685
11 clang             0x00000001001eee56
clang::CanQual<clang::Type>::getTypePtr() const + 9910
12 clang             0x00000001001eefcc
clang::CanQual<clang::Type>::getTypePtr() const + 10284
13 clang             0x00000001001a627d llvm::cast_retty<clang::CXXMethodDecl,
clang::CXXDestructorDecl const*>::ret_type llvm::cast<clang::CXXMethodDecl,
clang::CXXDestructorDecl const*>(clang::CXXDestructorDecl const* const&) + 4845
14 clang             0x000000010023e44c void
clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::ObjCMethodDecl>(clang::CodeGen::CallArgList&,
clang::ObjCMethodDecl const*, clang::ConstExprIterator,
clang::ConstExprIterator) + 524
15 clang             0x0000000100239c44 llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateFCmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine
const&) + 23604
16 clang             0x000000010022ae02
clang::CodeGen::CGRecordLayout::getNonVirtualBaseLLVMFieldNo(clang::CXXRecordDecl
const*) const + 45906
17 clang             0x000000010022b8dd
clang::CodeGen::CGRecordLayout::getNonVirtualBaseLLVMFieldNo(clang::CXXRecordDecl
const*) const + 48685
18 clang             0x00000001001ecf88
clang::CanQual<clang::Type>::getTypePtr() const + 2024
19 clang             0x00000001002bf6f4
clang::BackendConsumer::InlineAsmDiagHandler(llvm::SMDiagnostic const&, void*,
unsigned int) + 11780
20 clang             0x00000001002981c2 llvm::DenseMap<clang::FieldDecl const*,
unsigned int, llvm::DenseMapInfo<clang::FieldDecl const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 43298
21 clang             0x0000000100294dd8 llvm::DenseMap<clang::FieldDecl const*,
unsigned int, llvm::DenseMapInfo<clang::FieldDecl const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 30008
22 clang             0x00000001002984fb llvm::DenseMap<clang::FieldDecl const*,
unsigned int, llvm::DenseMapInfo<clang::FieldDecl const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 44123
23 clang             0x00000001002988c2 llvm::DenseMap<clang::FieldDecl const*,
unsigned int, llvm::DenseMapInfo<clang::FieldDecl const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 45090
24 clang             0x0000000100294980 llvm::DenseMap<clang::FieldDecl const*,
unsigned int, llvm::DenseMapInfo<clang::FieldDecl const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 28896
25 clang             0x0000000100234ae7 llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateFCmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine
const&) + 2775
26 clang             0x00000001002cde10 llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 45872
27 clang             0x00000001002e074f llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateExtractValue(llvm::Value*, unsigned int, llvm::Twine const&) + 3231
28 clang             0x00000001002bc48b
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 155
29 clang             0x00000001002ed2c2 llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateAdd(llvm::Value*, llvm::Value*, llvm::Twine const&, bool, bool) + 674
30 clang             0x00000001002ba99c
llvm::DenseMap<clang::CodeGen::GlobalDecl, long long,
llvm::DenseMapInfo<clang::CodeGen::GlobalDecl>, llvm::DenseMapInfo<long long>
>::grow(unsigned int) + 2188
31 clang             0x00000001000425f1 llvm::DenseMap<clang::IdentifierInfo
const*, unsigned int, llvm::DenseMapInfo<clang::IdentifierInfo const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 8945
32 clang             0x000000010000aac5 std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert_unique(std::string const&) + 1893
33 clang             0x0000000100001d18
34 clang             0x0000000100009c82 std::vector<std::string,
std::allocator<std::string> >::operator=(std::vector<std::string,
std::allocator<std::string> > const&) + 12962
35 clang             0x0000000100001134
36 clang             0x000000000000003e
Stack dump:
0.    Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-apple-macosx10.6.7 -emit-obj -disable-free -main-file-name OFString.m
-pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 123.2 -g -coverage-file OFString.lib.o -resource-dir
/usr/local/bin/../lib/clang/3.0 -D PIC -I . -I .. -I exceptions -O2 -Wall
-Wwrite-strings -Wcast-align -Wpointer-arith -Werror -Wno-unused-variable
-Wno-strict-aliasing -std=gnu99 -fconst-strings -fconstant-string-class
OFConstantString -ferror-limit 19 -fmessage-length 80 -stack-protector 1
-fblocks -fobjc-exceptions -fexceptions -fobjc-nonfragile-abi
-fobjc-dispatch-method=mixed -fno-constant-cfstrings -fno-common
-fdiagnostics-show-option -fcolor-diagnostics -o OFString.lib.o -x objective-c
OFString.m 
1.    OFString.m:1082:1: current parser token '-'
2.    OFString.m:1059:1: LLVM IR generation of declaration
'OFString::XMLElementBySerializing'
3.    OFString.m:1060:1: LLVM IR generation of compound statement ('{}')

Don't really get what is causing this.
Source file: https://webkeks.org/hg/objfw/file/b54168b743d1/src/OFString.m

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