alexfh added a comment.

In D111283#3783627 <https://reviews.llvm.org/D111283#3783627>, @alexfh wrote:

> Hi Matheus, an early heads up: this commit is causing clang crashes on some 
> of our code. I'll post more details a bit later.

The stack trace of the failure looks like this:

   #0 0x0000564e08f78aca llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) 
(./clang-after+0x7778aca)
   #1 0x0000564e08f76b78 llvm::sys::RunSignalHandlers() 
(./clang-after+0x7776b78)                                                       
                                                                                
                                
   #2 0x0000564e08f10027 (anonymous 
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) 
(./clang-after+0x7710027)
   #3 0x0000564e08f102bd CrashRecoverySignalHandler(int) 
(./clang-after+0x77102bd)
   #4 0x00007f4773e731c0 __restore_rt
   #5 0x0000564e06591b6b (./clang-after+0x4d91b6b)
   #6 0x0000564e06374ef8 checkDeducedTemplateArguments(clang::ASTContext&, 
clang::DeducedTemplateArgument const&, clang::DeducedTemplateArgument const&) 
(./clang-after+0x4b74ef8)
   #7 0x0000564e0636b7b1 DeduceTemplateArgumentsByTypeMatch(clang::Sema&, 
clang::TemplateParameterList*, clang::QualType, clang::QualType, 
clang::sema::TemplateDeductionInfo&, 
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, bool, 
bool) (./clang-after+0x4b6b7b1)
   #8 0x0000564e0636c896 DeduceTemplateArgumentsByTypeMatch(clang::Sema&, 
clang::TemplateParameterList*, clang::QualType, clang::QualType, 
clang::sema::TemplateDeductionInfo&, 
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, bool, 
bool) (./clang-after+0x4b6c896)
   #9 0x0000564e06376430 DeduceTemplateArguments(clang::Sema&, 
clang::TemplateParameterList*, clang::QualType const*, unsigned int, 
clang::QualType const*, unsigned int, clang::sema::TemplateDeductionInfo&, 
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, bool) 
(./clang-after+0x4b76430)
  #10 0x0000564e06370895 isAtLeastAsSpecializedAs(clang::Sema&, 
clang::SourceLocation, clang::FunctionTemplateDecl*, 
clang::FunctionTemplateDecl*, clang::TemplatePartialOrderingContext, unsigned 
int, bool) (./clang-after+0x4b70895)
  #11 0x0000564e063702c1 
clang::Sema::getMoreSpecializedTemplate(clang::FunctionTemplateDecl*, 
clang::FunctionTemplateDecl*, clang::SourceLocation, 
clang::TemplatePartialOrderingContext, unsigned int, unsigned int, bool, bool) 
(./clang-after+0x4b702c1)
  #12 0x0000564e0626a07c clang::isBetterOverloadCandidate(clang::Sema&, 
clang::OverloadCandidate const&, clang::OverloadCandidate const&, 
clang::SourceLocation, clang::OverloadCandidateSet::CandidateSetKind) 
(./clang-after+0x4a6a07c)
  #13 0x0000564e0625e199 
clang::OverloadCandidateSet::BestViableFunction(clang::Sema&, 
clang::SourceLocation, clang::OverloadCandidate*&) (./clang-after+0x4a5e199)
  #14 0x0000564e06272aec clang::Sema::BuildOverloadedCallExpr(clang::Scope*, 
clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation, 
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, 
bool) (./clang-after+0x4a72aec)
  #15 0x0000564e05fd3157 clang::Sema::BuildCallExpr(clang::Scope*, 
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, 
clang::SourceLocation, clang::Expr*, bool, bool) (./clang-after+0x47d3157)
  #16 0x0000564e05feb5b6 clang::Sema::ActOnCallExpr(clang::Scope*, 
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, 
clang::SourceLocation, clang::Expr*) (./clang-after+0x47eb5b6)
  #17 0x0000564e063d0bc6 clang::TreeTransform<(anonymous 
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) 
(./clang-after+0x4bd0bc6)
  #18 0x0000564e063c80f9 clang::Sema::SubstInitializer(clang::Expr*, 
clang::MultiLevelTemplateArgumentList const&, bool) (./clang-after+0x4bc80f9)
  #19 0x0000564e064057c8 
clang::Sema::InstantiateVariableInitializer(clang::VarDecl*, clang::VarDecl*, 
clang::MultiLevelTemplateArgumentList const&) (./clang-after+0x4c057c8)
  #20 0x0000564e063fa1be 
clang::Sema::BuildVariableInstantiation(clang::VarDecl*, clang::VarDecl*, 
clang::MultiLevelTemplateArgumentList const&, 
llvm::SmallVector<clang::Sema::LateInstantiatedAttribute, 16u>*, 
clang::DeclContext*, clang::LocalInstantiationScope*, bool, 
clang::VarTemplateSpecializationDecl*) (./clang-after+0x4bfa1be)
  #21 0x0000564e063f99db 
clang::TemplateDeclInstantiator::VisitVarDecl(clang::VarDecl*, bool, 
llvm::ArrayRef<clang::BindingDecl*>*) (./clang-after+0x4bf99db)
  #22 0x0000564e0642f599 void llvm::function_ref<void 
()>::callback_fn<clang::Sema::SubstDecl(clang::Decl*, clang::DeclContext*, 
clang::MultiLevelTemplateArgumentList const&)::$_0>(long) 
(./clang-after+0x4c2f599)
  #23 0x0000564e05cc55ee 
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, 
llvm::function_ref<void ()>) (./clang-after+0x44c55ee)
  #24 0x0000564e06406ceb clang::Sema::SubstDecl(clang::Decl*, 
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) 
(./clang-after+0x4c06ceb)
  #25 0x0000564e063e91ac clang::TreeTransform<(anonymous 
namespace)::TemplateInstantiator>::TransformDeclStmt(clang::DeclStmt*) 
(./clang-after+0x4be91ac)
  #26 0x0000564e063e08c7 clang::TreeTransform<(anonymous 
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*, 
bool) (./clang-after+0x4be08c7)
  #27 0x0000564e063c96be clang::Sema::SubstStmt(clang::Stmt*, 
clang::MultiLevelTemplateArgumentList const&) (./clang-after+0x4bc96be)
  #28 0x0000564e06408b57 
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, 
clang::FunctionDecl*, bool, bool, bool) (./clang-after+0x4c08b57)
  #29 0x0000564e0640ad95 clang::Sema::PerformPendingInstantiations(bool) 
(./clang-after+0x4c0ad95)
  #30 0x0000564e06408c54 
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, 
clang::FunctionDecl*, bool, bool, bool) (./clang-after+0x4c08c54)
  #31 0x0000564e0640ad95 clang::Sema::PerformPendingInstantiations(bool) 
(./clang-after+0x4c0ad95)
  #32 0x0000564e05cc7b40 
clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind) 
(./clang-after+0x44c7b40)
  #33 0x0000564e05cc8877 clang::Sema::ActOnEndOfTranslationUnit() 
(./clang-after+0x44c8877)
  #34 0x0000564e05a344ec 
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, 
clang::Sema::ModuleImportState&) (./clang-after+0x42344ec)
  #35 0x0000564e05a2effe clang::ParseAST(clang::Sema&, bool, bool) 
(./clang-after+0x422effe)
  #36 0x0000564e057af31a clang::FrontendAction::Execute() 
(./clang-after+0x3faf31a)
  #37 0x0000564e057224e6 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) 
(./clang-after+0x3f224e6)
  #38 0x0000564e049d9446 
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) 
(./clang-after+0x31d9446)
  #39 0x0000564e049cdb40 cc1_main(llvm::ArrayRef<char const*>, char const*, 
void*) (./clang-after+0x31cdb40)
  #40 0x0000564e049cbda4 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) 
(./clang-after+0x31cbda4)
  #41 0x0000564e058afcf7 void llvm::function_ref<void 
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>,
 std::__u::basic_string<char, std::__u::char_traits<char>, 
std::__u::allocator<char>>*, bool*) const::$_1>(long) (./clang-after+0x40afcf7)
  #42 0x0000564e08f0fef1 
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) 
(./clang-after+0x770fef1)
  #43 0x0000564e058af64c 
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>,
 std::__u::basic_string<char, std::__u::char_traits<char>, 
std::__u::allocator<char>>*, bool*) const (./clang-after+0x40af64c)
  #44 0x0000564e05874f77 
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, 
clang::driver::Command const*&, bool) const (./clang-after+0x4074f77)
  #45 0x0000564e05875230 
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, 
llvm::SmallVectorImpl<std::__u::pair<int, clang::driver::Command const*>>&, 
bool) const (./clang-after+0x4075230)
  #46 0x0000564e058911af 
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, 
llvm::SmallVectorImpl<std::__u::pair<int, clang::driver::Command const*>>&) 
(./clang-after+0x40911af)
  #47 0x0000564e049cb50b clang_main(int, char**) (./clang-after+0x31cb50b)
  #48 0x00007f4773d04633 __libc_start_main
  #49 0x0000564e049c846a _start (./clang-after+0x31c846a)
  clang-after: error: clang frontend command failed with exit code 133 (use -v 
to see invocation)
  clang version google3-trunk (1819d5999c7091781a6441dad4bcede9c554ca90)
  Target: x86_64-unknown-linux-gnu

I'm reducing the test case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111283/new/

https://reviews.llvm.org/D111283

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to