[LLVMbugs] [Bug 23882] New: Segfault on compiling std::bind with placeholders

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 18 08:03:57 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23882

            Bug ID: 23882
           Summary: Segfault on compiling std::bind with placeholders
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: afalin at xakep.ru
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14489
  --> https://llvm.org/bugs/attachment.cgi?id=14489&action=edit
Original source

$ clang++ original.cpp --std=c++11
x86_64-pc-linux-gnu-clang-3.6.1: error: unable to execute command: Segmentation
fault
x86_64-pc-linux-gnu-clang-3.6.1: error: clang frontend command failed due to
signal (use -v to see invocation)
clang version 3.6.1 (tags/RELEASE_361/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
x86_64-pc-linux-gnu-clang-3.6.1: note: diagnostic msg: PLEASE submit a bug
report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed
source, and associated run script.
x86_64-pc-linux-gnu-clang-3.6.1: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
x86_64-pc-linux-gnu-clang-3.6.1: note: diagnostic msg: /tmp/original-1a075e.cpp
x86_64-pc-linux-gnu-clang-3.6.1: note: diagnostic msg: /tmp/original-1a075e.sh
x86_64-pc-linux-gnu-clang-3.6.1: note: diagnostic msg: 

********************

(gdb) bt
#0  0x0000000000db6e18 in TryUserDefinedConversion(clang::Sema&, clang::Expr*,
clang::QualType, bool, bool, bool, bool, bool, bool) ()
#1  0x0000000000db74fd in TryImplicitConversion(clang::Sema&, clang::Expr*,
clang::QualType, bool, bool, bool, bool, bool, bool) ()
#2  0x0000000000db36af in TryCopyInitialization(clang::Sema&, clang::Expr*,
clang::QualType, bool, bool, bool, bool) ()
#3  0x0000000000db47a5 in
clang::Sema::AddOverloadCandidate(clang::FunctionDecl*, clang::DeclAccessPair,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool, bool)
()
#4  0x0000000000d48361 in ResolveConstructorOverload(clang::Sema&,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, llvm::ArrayRef<clang::NamedDecl*>,
clang::OverloadCandidate*&, bool, bool, bool, bool) ()
#5  0x0000000000d485bd in TryConstructorInitialization(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType,
clang::InitializationSequence&, bool) ()
#6  0x0000000000d525b2 in
clang::InitializationSequence::InitializeFrom(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) ()
#7  0x0000000000d53129 in
clang::Sema::PerformCopyInitialization(clang::InitializedEntity const&,
clang::SourceLocation, clang::ActionResult<clang::Expr*, true>, bool, bool) ()
#8  0x0000000000ccda22 in
clang::Sema::GatherArgumentsForCall(clang::SourceLocation,
clang::FunctionDecl*, clang::FunctionProtoType const*, unsigned int,
llvm::ArrayRef<clang::Expr*>, llvm::SmallVectorImpl<clang::Expr*>&,
clang::Sema::VariadicCallType, bool, bool) ()
#9  0x0000000000c267c0 in
clang::Sema::CompleteConstructorCall(clang::CXXConstructorDecl*,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation,
llvm::SmallVectorImpl<clang::Expr*>&, bool, bool) ()
#10 0x0000000000d4ce20 in clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*) ()
#11 0x0000000000d5314b in
clang::Sema::PerformCopyInitialization(clang::InitializedEntity const&,
clang::SourceLocation, clang::ActionResult<clang::Expr*, true>, bool, bool) ()
#12 0x0000000000ccda22 in
clang::Sema::GatherArgumentsForCall(clang::SourceLocation,
clang::FunctionDecl*, clang::FunctionProtoType const*, unsigned int,
llvm::ArrayRef<clang::Expr*>, llvm::SmallVectorImpl<clang::Expr*>&,
clang::Sema::VariadicCallType, bool, bool) ()
#13 0x0000000000c267c0 in
clang::Sema::CompleteConstructorCall(clang::CXXConstructorDecl*,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation,
llvm::SmallVectorImpl<clang::Expr*>&, bool, bool) ()
...
#5417 0x0000000000ccda22 in
clang::Sema::GatherArgumentsForCall(clang::SourceLocation,
clang::FunctionDecl*, clang::FunctionProtoType const*, unsigned int,
llvm::ArrayRef<clang::Expr*>, llvm::SmallVectorImpl<clang::Expr*>&,
clang::Sema::VariadicCallType, bool, bool) ()
---Type <return> to continue, or q <return> to quit---
#5418 0x0000000000cce99a in
clang::Sema::ConvertArgumentsForCall(clang::CallExpr*, clang::Expr*,
clang::FunctionDecl*, clang::FunctionProtoType const*,
llvm::ArrayRef<clang::Expr*>, clang::SourceLocation, bool) ()
#5419 0x0000000000ccfa11 in clang::Sema::BuildResolvedCallExpr(clang::Expr*,
clang::NamedDecl*, clang::SourceLocation, llvm::ArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) ()
#5420 0x0000000000ccff1f in clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) ()
#5421 0x0000000000e83a28 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) ()
#5422 0x0000000000e7f2ef in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
#5423 0x0000000000e780de in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5424 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5425 0x0000000000e798a3 in clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) ()
#5426 0x0000000000e05057 in
clang::Sema::SubstDefaultTemplateArgumentIfAvailable(clang::TemplateDecl*,
clang::SourceLocation, clang::SourceLocation, clang::Decl*,
llvm::SmallVectorImpl<clang::TemplateArgument>&, bool&) ()
#5427 0x0000000000e54a79 in
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*) ()
#5428 0x0000000000e5e304 in
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) ()
#5429 0x0000000000db3d3b in
clang::Sema::AddMethodTemplateCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::CXXRecordDecl*, clang::TemplateArgumentListInfo*,
clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool) ()
#5430 0x0000000000db3f03 in
clang::Sema::AddMethodCandidate(clang::DeclAccessPair, clang::QualType,
clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool) ()
#5431 0x0000000000dc35a2 in
clang::Sema::BuildCallToObjectOfClassType(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation) ()
#5432 0x0000000000cd06e4 in clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) ()
#5433 0x0000000000e83a28 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) ()
#5434 0x0000000000e7f2ef in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
#5435 0x0000000000e780de in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5436 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5437 0x0000000000e7ad3a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::QualType) ()
#5438 0x0000000000e7af23 in clang::Sema::SubstType(clang::QualType,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) ()
#5439 0x0000000000e16673 in
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) ()
#5440 0x0000000000e8aae2 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) ()
#5441 0x0000000000e7890f in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5442 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5443 0x0000000000e87835 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) ()
#5444 0x0000000000e8aa40 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) ()
#5445 0x0000000000e7890f in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5446 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5447 0x0000000000e87835 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) ()
#5448 0x0000000000e8aa40 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) ()
#5449 0x0000000000e7890f in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5450 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5451 0x0000000000e7ad3a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::QualType) ()
#5452 0x0000000000e7af23 in clang::Sema::SubstType(clang::QualType,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) ()
#5453 0x0000000000e16673 in
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) ()
---Type <return> to continue, or q <return> to quit---
#5454 0x0000000000e8aae2 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) ()
#5455 0x0000000000e7890f in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5456 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5457 0x0000000000e87835 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) ()
#5458 0x0000000000e8aa40 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) ()
#5459 0x0000000000e7890f in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5460 0x0000000000e79775 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#5461 0x0000000000e798a3 in clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) ()
#5462 0x0000000000e05057 in
clang::Sema::SubstDefaultTemplateArgumentIfAvailable(clang::TemplateDecl*,
clang::SourceLocation, clang::SourceLocation, clang::Decl*,
llvm::SmallVectorImpl<clang::TemplateArgument>&, bool&) ()
#5463 0x0000000000e54a79 in
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*) ()
#5464 0x0000000000e5e304 in
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) ()
#5465 0x0000000000db4a93 in
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) ()
#5466 0x00000000005d480d in TryUserDefinedConversion(clang::Sema&,
clang::QualType, clang::InitializationKind const&, clang::Expr*,
clang::InitializationSequence&, bool) ()
#5467 0x0000000000d5289f in
clang::InitializationSequence::InitializeFrom(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) ()
#5468 0x0000000000be8705 in clang::Sema::AddInitializerToDecl(clang::Decl*,
clang::Expr*, bool, bool) ()
#5469 0x0000000000a9c28a in
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) ()
#5470 0x0000000000aaade1 in
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) ()
#5471 0x0000000000aabc79 in clang::Parser::ParseSimpleDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*) ()
#5472 0x0000000000aabf4d in clang::Parser::ParseDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) ()
#5473 0x0000000000b005ff in
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
()
#5474 0x0000000000b007f8 in
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) ()
#5475 0x0000000000b032fe in clang::Parser::ParseCompoundStatementBody(bool) ()
#5476 0x0000000000b051f6 in
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) ()
#5477 0x0000000000a92d29 in
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
()
#5478 0x0000000000aab05b in
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) ()
#5479 0x0000000000a8e911 in
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) ()
#5480 0x0000000000a8efb9 in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) [clone .part.170] ()
#5481 0x0000000000a8efef in
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) ()
#5482 0x0000000000a94453 in
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) ()
#5483 0x0000000000a94bf0 in
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) ()
#5484 0x0000000000a89d13 in clang::ParseAST(clang::Sema&, bool, bool) ()
#5485 0x0000000000717f86 in clang::FrontendAction::Execute() ()
#5486 0x00000000006f2a41 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#5487 0x00000000006da813 in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#5488 0x00000000006d41c0 in cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) ()
#5489 0x00000000006d37d2 in main ()

-- 
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/20150618/47d66c45/attachment.html>


More information about the llvm-bugs mailing list