[LLVMbugs] [Bug 9247] New: Crash on invalid in clang::Sema::ActOnFinishCXXMemberSpecification
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 18 12:00:14 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9247
Summary: Crash on invalid in
clang::Sema::ActOnFinishCXXMemberSpecification
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: matthewbg at google.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
struct A {
virtual void g(const A& input) = 0;
struct B {
C* f(int foo);
};
};
$ clang -fsyntax-only /tmp/3466630.ii
/tmp/3466630.ii:4:5: error: unknown type name 'C'
C* f(int foo);
^
0 clang 0x000000000215f340
1 clang 0x000000000215f13c
2 libpthread.so.0 0x00007fa19e7789f0
3 clang 0x00000000011fd5fa llvm::PointerIntPair<void*, 1u, bool,
llvm::PointerUnionUIntTraits<clang::TypeSourceInfo*,
clang::DeclaratorDecl::ExtInfo*> >::getInt() const + 16
4 clang 0x00000000011fc25e int
llvm::PointerUnion<clang::TypeSourceInfo*,
clang::DeclaratorDecl::ExtInfo*>::is<clang::DeclaratorDecl::ExtInfo*>() const +
74
5 clang 0x00000000011f84e0 clang::DeclaratorDecl::hasExtInfo() const
+ 28
6 clang 0x00000000011f851e
clang::DeclaratorDecl::getTypeSourceInfo() const + 24
7 clang 0x000000000154ca72
8 clang 0x000000000154c3dc
9 clang 0x000000000154d0a5
10 clang 0x000000000154d126
11 clang 0x000000000154d1bd
12 clang 0x000000000154d368
13 clang 0x000000000154d470
clang::Sema::CheckCompletedCXXClass(clang::CXXRecordDecl*) + 158
14 clang 0x000000000154e1af
clang::Sema::ActOnFinishCXXMemberSpecification(clang::Scope*,
clang::SourceLocation, clang::Decl*, clang::SourceLocation,
clang::SourceLocation, clang::AttributeList*) + 199
15 clang 0x0000000001399f33
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 1703
16 clang 0x00000000013978a0
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 5760
17 clang 0x000000000137e100
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 6450
18 clang 0x0000000001359a20
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 88
19 clang 0x0000000001359e45
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 113
20 clang 0x00000000013597c3
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2199
21 clang 0x0000000001358e9c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 210
22 clang 0x00000000013561c1 clang::ParseAST(clang::Sema&, bool) + 328
23 clang 0x000000000129036d clang::ASTFrontendAction::ExecuteAction()
+ 263
24 clang 0x000000000128ffc5 clang::FrontendAction::Execute() + 319
25 clang 0x000000000120915f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 747
26 clang 0x0000000000e98f25
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 879
27 clang 0x0000000000e8ad07 cc1_main(char const**, char const**, char
const*, void*) + 951
28 clang 0x0000000000e94448 main + 481
29 libc.so.6 0x00007fa19dedfd5d __libc_start_main + 253
30 clang 0x0000000000e8a36e
Stack dump:
0. Program arguments: clang -cc1 -triple x86_64-unknown-linux-gnu
-fsyntax-only -disable-free -main-file-name 3466630.ii -mrelocation-model
static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -momit-leaf-frame-pointer -resource-dir ../lib/clang/2.0
-ferror-limit 19 -fmessage-length 80 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -x c++-cpp-output /tmp/3466630.ii
1. /tmp/3466630.ii:6:2: current parser token ';'
2. /tmp/3466630.ii:1:1: parsing struct/union/class body 'A'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal 1 (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