[LLVMbugs] [Bug 21248] New: clang crashes when compiling with missing template names
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Oct 10 20:00:06 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21248
Bug ID: 21248
Summary: clang crashes when compiling with missing template
names
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: ryan.burn at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13185
--> http://llvm.org/bugs/attachment.cgi?id=13185&action=edit
source code
clang: /root/clang/llvm/tools/clang/lib/Sema/SemaTemplate.cpp:2793: ExprResult
clang::Sema::BuildTemplateIdExpr(const clang::CXXScopeSpec &,
clang::SourceLocation, clang::LookupResult &, bool, const
clang::TemplateArgumentListInfo *): Assertion `!R.empty() && "empty lookup
results when building templateid"' failed.
0 clang 0x00000000023f3135 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1 clang 0x00000000023f3883
2 libpthread.so.0 0x00007fd827ca2b10
3 libc.so.6 0x00007fd826c9a515 gsignal + 53
4 libc.so.6 0x00007fd826c9b998 abort + 328
5 libc.so.6 0x00007fd826c93602
6 libc.so.6 0x00007fd826c936b2
7 clang 0x0000000000d84321
8 clang 0x0000000000c3a4f3
clang::Sema::ActOnIdExpression(clang::Scope*, clang::CXXScopeSpec&,
clang::SourceLocation, clang::UnqualifiedId&, bool, bool,
clang::CorrectionCandidateCallback*, bool) + 2883
9 clang 0x0000000000a8b239 clang::Parser::ParseCXXIdExpression(bool)
+ 249
10 clang 0x0000000000a7e395 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 6885
11 clang 0x0000000000a79d00
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 128
12 clang 0x0000000000a801df
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) + 2479
13 clang 0x0000000000a7cc97 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 999
14 clang 0x0000000000a7a507
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 1911
15 clang 0x0000000000a850c1
clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&,
llvm::SmallVectorImpl<clang::SourceLocation>&, void
(clang::Sema::*)(clang::Scope*, clang::Expr*, llvm::ArrayRef<clang::Expr*>),
clang::Expr*) + 401
16 clang 0x0000000000a7c1f2
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 4130
17 clang 0x0000000000a7e3a6 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 6902
18 clang 0x0000000000a7e69c clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 7660
19 clang 0x0000000000a79d00
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 128
20 clang 0x0000000000a79c69
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
21 clang 0x0000000000ab0f8e clang::Parser::ParseDoStatement() + 1102
22 clang 0x0000000000aad8f8
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 3480
23 clang 0x0000000000aacac0
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 144
24 clang 0x0000000000ab45e4
clang::Parser::ParseCompoundStatementBody(bool) + 1588
25 clang 0x0000000000aacf83
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1059
26 clang 0x0000000000aacac0
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 144
27 clang 0x0000000000ab0059
clang::Parser::ParseIfStatement(clang::SourceLocation*) + 665
28 clang 0x0000000000aad942
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 3554
29 clang 0x0000000000aacac0
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 144
30 clang 0x0000000000ab45e4
clang::Parser::ParseCompoundStatementBody(bool) + 1588
31 clang 0x0000000000ab7b0b
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 187
32 clang 0x0000000000a4369d
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1821
33 clang 0x0000000000a5576d
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1373
34 clang 0x0000000000a42d2c
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 716
35 clang 0x0000000000a42753
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 403
36 clang 0x0000000000a41ad8
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2712
37 clang 0x0000000000a40f4b
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 507
38 clang 0x0000000000a3d646 clang::ParseAST(clang::Sema&, bool, bool)
+ 454
39 clang 0x00000000008ab7de clang::CodeGenAction::ExecuteAction() +
142
40 clang 0x0000000000700270 clang::FrontendAction::Execute() + 112
41 clang 0x00000000006daf0d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 925
42 clang 0x00000000006c100f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2959
43 clang 0x00000000006b8fa4 cc1_main(char const**, char const**, char
const*, void*) + 692
44 clang 0x00000000006bf219 main + 9161
45 libc.so.6 0x00007fd826c86b95 __libc_start_main + 245
46 clang 0x00000000006b8c29
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
slice_test-1d1baf.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.23.2 -coverage-file
/home/rnburn/work/k_array/slice_test-1d1baf.o -resource-dir
/usr/local/bin/../lib/clang/3.5.0 -I /home/rnburn/proj -internal-isystem
/usr/local/bin/../include/c++/v1 -internal-isystem /usr/local/include
-internal-isystem /usr/local/bin/../lib/clang/3.5.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++1y -fdeprecated-macro -fdebug-compilation-dir /home/rnburn/work/k_array
-ferror-limit 19 -fmessage-length 166 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-slp -o slice_test-1d1baf.o -x c++ /tmp/slice_test-1d1baf.cpp
1. /home/rnburn/proj/k_array/echo/k_space/test/slice_test.cpp:23:5
<Spelling=/home/rnburn/proj/k_array/echo/k_space/test/slice_test.cpp:23:26>:
current parser token '('
2. /home/rnburn/proj/k_array/echo/k_space/test/slice_test.cpp:7:25: parsing
function body '____C_A_T_C_H____T_E_S_T____7'
3. /home/rnburn/proj/k_array/echo/k_space/test/slice_test.cpp:7:25: in
compound statement ('{}')
4. /home/rnburn/proj/k_array/echo/k_space/test/slice_test.cpp:11:22: in
compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0 (trunk 204016)
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/slice_test-1d1baf-eb6846.cpp
clang: note: diagnostic msg: /tmp/slice_test-1d1baf-eb6846.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/20141011/6405f951/attachment.html>
More information about the llvm-bugs
mailing list