[LLVMbugs] [Bug 7685] New: Stack dump without assertion on invalid code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 21 07:18:56 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7685
Summary: Stack dump without assertion on invalid code
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=5251)
--> (http://llvm.org/bugs/attachment.cgi?id=5251)
test case without assertion
Reduced from a broken boost test. This is a stack dump without an assertion.
Reduced from a broken boost testcase
(libs/spirit/repository/example/karma/calc2_ast_dump_sr.cpp).
noAssertion.cc:2:11: error: parse error
template <1> call()
^
noAssertion.cc:2:14: error: C++ requires a type specifier for all declarations
template <1> call()
^
noAssertion.cc:2:14: error: no function template matches function template
specialization 'call'
noAssertion.cc:4:5: error: template argument for non-type template parameter
must be an expression
map<int>()
^~~
noAssertion.cc:1:14: note: template parameter is declared here
template <int> struct map ;
^
0 clang 0x00000001010fbd78 PrintStackTrace(void*) + 38
1 clang 0x00000001010fc286 SignalHandler(int) + 254
2 libSystem.B.dylib 0x00007fff8398c35a _sigtramp + 26
3 libSystem.B.dylib 0x00007fff5fbf9700 _sigtramp + 3693532096
4 clang 0x000000010043c92d
clang::LocInfoType::LocInfoType(clang::QualType, clang::TypeSourceInfo*) + 37
5 clang 0x0000000100432001
clang::Sema::CreateLocInfoType(clang::QualType, clang::TypeSourceInfo*) + 93
6 clang 0x00000001004386c9
clang::Sema::ActOnTypeName(clang::Scope*, clang::Declarator&) + 433
7 clang 0x00000001006b70d5
clang::Parser::ParseCXXTypeConstructExpression(clang::DeclSpec const&) + 119
8 clang 0x00000001006b19c2
clang::Parser::ParseCastExpression(bool, bool, bool&, void*) + 8128
9 clang 0x00000001006b2601
clang::Parser::ParseCastExpression(bool, bool, void*) + 97
10 clang 0x00000001006ace87
clang::Parser::ParseAssignmentExpression() + 241
11 clang 0x00000001006ad40e clang::Parser::ParseExpression() + 42
12 clang 0x00000001006ce6f8
clang::Parser::ParseStatementOrDeclaration(bool) + 1662
13 clang 0x00000001006d2c5a
clang::Parser::ParseCompoundStatementBody(bool) + 220
14 clang 0x00000001006d3285
clang::Parser::ParseFunctionStatementBody(clang::OpaquePtr<0>) + 193
15 clang 0x00000001006dd679
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 1237
16 clang 0x00000001006d7782
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 1214
17 clang 0x00000001006d7ca9
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 999
18 clang 0x00000001006d7d90
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 158
19 clang 0x000000010069ff20
clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&,
clang::CXX0XAttributeList) + 368
20 clang 0x00000001006de445
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList) + 2007
21 clang 0x00000001006de673
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<1>&) + 247
22 clang 0x0000000100265337 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 456
23 clang 0x0000000100079062
clang::ASTFrontendAction::ExecuteAction() + 254
24 clang 0x0000000100226940 clang::CodeGenAction::ExecuteAction() +
826
25 clang 0x0000000100079170 clang::FrontendAction::Execute() + 256
26 clang 0x000000010005c380
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 710
27 clang 0x00000001000280d6 cc1_main(char const**, char const**,
char const*, void*) + 1762
28 clang 0x000000010002f836 main + 450
29 clang 0x0000000100026fd4 start + 52
30 clang 0x0000000000000021 start + 4294807681
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name
noAssertion.cc -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -resource-dir /usr/local/lib/clang/2.8 -ferror-limit 19
-fmessage-length 80 -stack-protector 1 -fblocks -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/M8/M86fCFVgGQ0r-V2oY5lLC++++TI/-Tmp-/cc-kM5PwQ.o -x c++
noAssertion.cc
1. noAssertion.cc:4:9: current parser token '('
2. noAssertion.cc:3:1: parsing function body 'call'
3. noAssertion.cc:3:1: in compound statement ('{}')
clang: error: clang frontend 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