[LLVMbugs] [Bug 12572] New: Extreme slow parsing of invalid input
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 17 03:28:02 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12572
Bug #: 12572
Summary: Extreme slow parsing of invalid input
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: joerg at NetBSD.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8397
--> http://llvm.org/bugs/attachment.cgi?id=8397
Reduced test case
The attached input takes much longer than 4min on my i7 when compiled with
clang -c. Stack trace looks something like the following:
#0 0x00000000015514a8 in
llvm::SmallVectorTemplateBase<clang::OverloadCandidate,
false>::push_back(clang::OverloadCandidate const&) ()
#1 0x000000000154fd78 in clang::OverloadCandidateSet::addCandidate(unsigned
int) ()
#2 0x0000000001537d9f in
clang::Sema::AddOverloadCandidate(clang::FunctionDecl*, clang::DeclAccessPair,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool, bool)
()
#3 0x00000000014f3677 in TryUserDefinedConversion(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr*, clang::InitializationSequence&)
()
#4 0x00000000014f4c95 in
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr**, unsigned int) ()
#5 0x00000000014e968c in (anonymous
namespace)::InitListChecker::CheckSubElementType(clang::InitializedEntity
const&, clang::InitListExpr*, clang::QualType, unsigned int&,
clang::InitListExpr*, unsigned int&) ()
#6 0x00000000014eb159 in (anonymous
namespace)::InitListChecker::CheckArrayType(clang::InitializedEntity const&,
clang::InitListExpr*, clang::QualType&, llvm::APSInt, bool, unsigned int&,
clang::InitListExpr*, unsigned int&) ()
#7 0x00000000014e8f8e in (anonymous
namespace)::InitListChecker::CheckListElementTypes(clang::InitializedEntity
const&, clang::InitListExpr*, clang::QualType&, bool, unsigned int&,
clang::InitListExpr*, unsigned int&, bool) ()
#8 0x00000000014e8677 in (anonymous
namespace)::InitListChecker::CheckExplicitInitList(clang::InitializedEntity
const&, clang::InitListExpr*, clang::QualType&, unsigned int&,
clang::InitListExpr*, unsigned int&, bool) ()
#9 0x00000000014e7e3d in (anonymous
namespace)::InitListChecker::InitListChecker(clang::Sema&,
clang::InitializedEntity const&, clang::InitListExpr*, clang::QualType&, bool,
bool) ()
#10 0x00000000014f150b in TryListInitialization(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::InitListExpr*, clang::InitializationSequence&) ()
#11 0x00000000014f45ce in
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr**, unsigned int) ()
#12 0x000000000137aa3c in clang::Sema::AddInitializerToDecl(clang::Decl*,
clang::Expr*, bool, bool) ()
#13 0x0000000000f34008 in
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) ()
#14 0x0000000000f33548 in
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) ()
#15 0x0000000000f25bf6 in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) ()
#16 0x0000000000f25c87 in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) ()
#17 0x0000000000f254cd in
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) ()
#18 0x0000000000f24948 in
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) ()
#19 0x0000000000f21753 in clang::ParseAST(clang::Sema&, bool, bool) ()
#20 0x0000000000e8bd76 in clang::ASTFrontendAction::ExecuteAction() ()
#21 0x0000000000c29210 in clang::CodeGenAction::ExecuteAction() ()
#22 0x0000000000e8b9ab in clang::FrontendAction::Execute() ()
#23 0x0000000000e68460 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#24 0x0000000000bfec00 in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#25 0x0000000000bf4091 in cc1_main(char const**, char const**, char const*,
void*) ()
#26 0x0000000000bee32d in main ()
--
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