[LLVMbugs] [Bug 15436] New: Crash in template matching
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 4 05:26:51 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15436
Bug ID: 15436
Summary: Crash in template matching
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: yu.valery+bugzilla at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10136
--> http://llvm.org/bugs/attachment.cgi?id=10136&action=edit
Preprocessed source and run script
clang:
/lscrs/yundin/stuff/src/llvm/tools/clang/lib/Sema/../../include/clang/AST/DeclTemplate.h:1509:
void
clang::ClassTemplateSpecializationDecl::setInstantiationOf(clang::ClassTemplatePartialSpecializationDecl*,
clang::TemplateArgumentList*): Assertion
`!SpecializedTemplate.is<SpecializedPartialSpecialization*>() && "Already set
to a class template partial specialization!"' failed.
0 clang 0x0000000001d70b22 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang 0x0000000001d70f49
2 libpthread.so.0 0x0000003dfe80f500
3 libc.so.6 0x0000003dfdc328a5 gsignal + 53
4 libc.so.6 0x0000003dfdc34085 abort + 373
5 libc.so.6 0x0000003dfdc2ba1e
6 libc.so.6 0x0000003dfdc2bae0 __assert_perror_fail + 0
7 clang 0x0000000000cc06a1
8 clang 0x0000000000cfa633
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1283
9 clang 0x0000000000a20e94
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 308
10 clang 0x0000000000c39fd6
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) + 198
11 clang 0x0000000000cb36f9
12 clang 0x0000000000ca9f13
13 clang 0x0000000000cac850
14 clang 0x0000000000cad603
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 163
15 clang 0x0000000000ca8367
clang::Sema::SubstParmVarDecl(clang::ParmVarDecl*,
clang::MultiLevelTemplateArgumentList const&, int, llvm::Optional<unsigned
int>, bool) + 135
16 clang 0x0000000000ca8c22
17 clang 0x0000000000ca97b0
18 clang 0x0000000000cac2d8
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, unsigned int) + 1400
19 clang 0x0000000000cd3168
clang::TemplateDeclInstantiator::SubstFunctionType(clang::FunctionDecl*,
llvm::SmallVectorImpl<clang::ParmVarDecl*>&) + 232
20 clang 0x0000000000cd64fd
clang::TemplateDeclInstantiator::VisitFunctionDecl(clang::FunctionDecl*,
clang::TemplateParameterList*) + 301
21 clang 0x0000000000cd95c4 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 100
22 clang 0x0000000000c82d16
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*) + 2358
23 clang 0x0000000000c850e9
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) + 729
24 clang 0x0000000000bfe624
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) + 340
25 clang 0x0000000000c0034d
clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) + 429
26 clang 0x0000000000c005b1
clang::Sema::buildOverloadedCallSet(clang::Scope*, clang::Expr*,
clang::UnresolvedLookupExpr*, clang::Expr**, unsigned int,
clang::SourceLocation, clang::OverloadCandidateSet*,
clang::ActionResult<clang::Expr*, true>*) + 289
27 clang 0x0000000000c00f4b
clang::Sema::BuildOverloadedCallExpr(clang::Scope*, clang::Expr*,
clang::UnresolvedLookupExpr*, clang::SourceLocation, clang::Expr**, unsigned
int, clang::SourceLocation, clang::Expr*, bool) + 427
28 clang 0x0000000000b5dccf clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) + 1343
29 clang 0x00000000009b78b7
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 2807
30 clang 0x00000000009b0aab clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 203
31 clang 0x00000000009b313d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
32 clang 0x00000000009b463f
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 31
33 clang 0x000000000098f5a0
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 544
34 clang 0x0000000000994a83
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1059
35 clang 0x000000000099b11e
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 750
36 clang 0x000000000099b36b
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 219
37 clang 0x00000000009e3159
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 377
38 clang 0x00000000009e3bfe
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 142
39 clang 0x00000000009e102c
clang::Parser::ParseCompoundStatementBody(bool) + 1916
40 clang 0x00000000009e861d
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 141
41 clang 0x0000000000989733
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1795
42 clang 0x0000000000994da1
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1857
43 clang 0x00000000009862c5
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 245
44 clang 0x00000000009869e0
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 976
45 clang 0x0000000000987d8d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 77
46 clang 0x00000000009884c8
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 184
47 clang 0x000000000098050d clang::ParseAST(clang::Sema&, bool, bool)
+ 493
48 clang 0x00000000006beac9 clang::FrontendAction::Execute() + 153
49 clang 0x00000000006a32cd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 349
50 clang 0x000000000068b536
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1478
51 clang 0x0000000000682d88 cc1_main(char const**, char const**, char
const*, void*) + 920
52 clang 0x0000000000689dad main + 637
53 libc.so.6 0x0000003dfdc1ecdd __libc_start_main + 253
54 clang 0x0000000000682879
Stack dump:
0. Program arguments: /lscrs/yundin/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
spntest.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.20.51.0.2 -momit-leaf-frame-pointer
-resource-dir /lscrs/yundin/bin/../lib/clang/3.3 -fmodule-cache-path
/var/tmp/clang-module-cache -c-isystem /lscrs/yundin/include -cxx-isystem
/lscrs/yundin/include -internal-isystem
/lscrs/yundin/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2
-internal-isystem
/lscrs/yundin/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2/x86_64-unknown-linux-gnu
-internal-isystem
/lscrs/yundin/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2/backward
-internal-isystem /usr/local/include -internal-isystem
/lscrs/yundin/bin/../lib/clang/3.3/include -internal-externc-isystem /include
-internal-
externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir
/lscrm/yundin/cache/clang1/example -ferror-limit 19 -fmessage-length 0
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -backend-option -vectorize-loops -o
/tmp/spntest-wTc9aJ.o -x c++ spntest.cpp
1. spntest.cpp:12:42: current parser token ')'
2. spntest.cpp:6:1: parsing function body 'main'
3. spntest.cpp:6:1: in compound statement ('{}')
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 173275)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/spntest-e36xRe.cpp
clang: note: diagnostic msg: /tmp/spntest-e36xRe.sh
clang: note: diagnostic msg:
********************
--
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/20130304/d4ad7f55/attachment.html>
More information about the llvm-bugs
mailing list