[LLVMbugs] [Bug 19532] New: clang 3.5 and 3.4 crash in clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 23 12:08:16 PDT 2014


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

            Bug ID: 19532
           Summary: clang 3.5 and 3.4 crash in
                    clang::CodeGen::CodeGenTypes::ConvertType(clang::QualT
                    ype)
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: beniz at droidnik.fr
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compiling https://github.com/beniz/libcmaes with clang 3.4 and clang 3.5 on
Linux and on Mac OSX does inevitably crash clang with following error:

0  libLLVM-3.5.so.1 0x00007fc78d6907e2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  libLLVM-3.5.so.1 0x00007fc78d6905d4
2  libpthread.so.0  0x00007fc78c526340
3  clang            0x0000000000863d5e
clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType) + 1934
4  clang            0x00000000008a0ade
clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(clang::CanQual<clang::Type>,
bool, llvm::ArrayRef<clang::CanQual<clang::Type> >,
clang::FunctionType::ExtInfo, clang::CodeGen::RequiredArgs) + 606
5  clang            0x00000000008a7fe1
6  clang            0x00000000008a8810
clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(clang::CXXRecordDecl const*,
clang::FunctionProtoType const*) + 192
7  clang            0x0000000000849ed3
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 67
8  clang            0x000000000084ac64
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 244
9  clang            0x000000000084d42d
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1341
10 clang            0x000000000084dc33
11 clang            0x00000000007f5643
12 clang            0x00000000007f30dc
13 clang            0x0000000000cbece5
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 1813
14 clang            0x0000000000c98fe2
clang::Sema::InstantiateClassMembers(clang::SourceLocation,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind) + 898
15 clang            0x0000000000c98ef3
clang::Sema::InstantiateClassMembers(clang::SourceLocation,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind) + 659
16 clang            0x0000000000c99196
clang::Sema::InstantiateClassTemplateSpecializationMembers(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind) +
86
17 clang            0x0000000000c40148
clang::Sema::ActOnExplicitInstantiation(clang::Scope*, clang::SourceLocation,
clang::SourceLocation, unsigned int, clang::SourceLocation, clang::CXXScopeSpec
const&, clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation,
clang::SourceLocation, llvm::MutableArrayRef<clang::ParsedTemplateArgument>,
clang::SourceLocation, clang::AttributeList*) + 1432
18 clang            0x000000000099094c
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 5180
19 clang            0x0000000000979f0e
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 2542
20 clang            0x00000000009cc59d
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 909
21 clang            0x00000000009cde19
clang::Parser::ParseExplicitInstantiation(unsigned int, clang::SourceLocation,
clang::SourceLocation, clang::SourceLocation&, clang::AccessSpecifier) + 169
22 clang            0x00000000009cdfdc
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 300
23 clang            0x000000000097e9b8
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 584
24 clang            0x0000000000968544
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 372
25 clang            0x0000000000989458
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 408
26 clang            0x0000000000989d0e clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 2014
27 clang            0x000000000097ea10
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 672
28 clang            0x0000000000968544
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 372
29 clang            0x0000000000968c8c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 428
30 clang            0x000000000096027b clang::ParseAST(clang::Sema&, bool,
bool) + 283
31 clang            0x000000000068f409 clang::FrontendAction::Execute() + 169
32 clang            0x000000000066f795
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 293
33 clang            0x000000000065a276
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1654
34 clang            0x0000000000654e48 cc1_main(char const**, char const**,
char const*, void*) + 1176
35 clang            0x0000000000653c10 main + 4640
36 libc.so.6        0x00007fc78bc57ec5 __libc_start_main + 245
37 clang            0x0000000000653e7f
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name cmastrategy.cc
-mrelocation-model pic -pic-level 2 -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.24 -momit-leaf-frame-pointer -g -sys-header-deps -D
HAVE_CONFIG_H -D PIC -O2 -Wall -std=c++11 -fdeprecated-macro -ferror-limit 19
-fmessage-length 112 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -x c++ cmastrategy-dac114.cpp 
1.    cmastrategy.cc:163:47: current parser token ';'
2.    cmastrategy.cc:29:1: parsing namespace 'libcmaes'
3.    cmastrategy.cc:33:92: LLVM IR generation of declaration
'libcmaes::CMAStrategy<libcmaes::CovarianceUpdate>::<anonymous
class>::operator()'
4.    cmastrategy.cc:33:92: Generating code for declaration
'libcmaes::CMAStrategy<libcmaes::CovarianceUpdate>::<anonymous
class>::operator()'
Segmentation fault (core dumped)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140423/ef60a35c/attachment.html>


More information about the llvm-bugs mailing list