Skip to content

ICE on valid(?) C++20 code #64808

@ericniebler

Description

@ericniebler
[build] Stack dump:
[build] 0.	Program arguments: /usr/bin/clang++-16 -I/home/eniebler/Code/stdexec/include -fsanitize=address -g -std=gnu++20 -Wall -ferror-limit=0 -fmacro-backtrace-limit=0 -ftemplate-backtrace-limit=0 -MD -MT examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -MF examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o.d -o examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -c /home/eniebler/Code/stdexec/examples/hello_world.cpp
[build] 1.	/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:2366:50: current parser token ')'
[build] 2.	/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:91:1: parsing namespace 'stdexec'
[build] 3.	/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:2338:3: parsing namespace 'stdexec::__inln'
[build] 4.	/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:2361:5: parsing struct/union/class body 'stdexec::__inln::__scheduler'
[build] 5.	/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:2365:55: parsing function body 'stdexec::__inln::tag_invoke'
[build] 6.	/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:2365:55: in compound statement ('{}')
[build] 7.	/home/eniebler/Code/stdexec/include/stdexec/__detail/__sender_utils.hpp:138:5: instantiating function definition 'stdexec::(anonymous class)::operator()<stdexec::__inln::__schedule_t, stdexec::__>'
[build] 8.	/home/eniebler/Code/stdexec/include/stdexec/__detail/__sender_utils.hpp:59:10: instantiating class definition 'stdexec::__basic_sender<(lambda at /home/eniebler/Code/stdexec/include/stdexec/__detail/__sender_utils.hpp:143:14)>'
[build] Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
[build] 0  libLLVM-16.so.1    0x00007feedfdbe706 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 54
[build] 1  libLLVM-16.so.1    0x00007feedfdbc8a0 llvm::sys::RunSignalHandlers() + 80
[build] 2  libLLVM-16.so.1    0x00007feedfcfd0f0
[build] 3  libc.so.6          0x00007feede642520
[build] 4  libclang-cpp.so.16 0x00007feee80a225e clang::Sema::CheckParameterPacksForExpansion(clang::SourceLocation, clang::SourceRange, llvm::ArrayRef<std::pair<llvm::PointerUnion<clang::TemplateTypeParmType const*, clang::NamedDecl*>, clang::SourceLocation>>, clang::MultiLevelTemplateArgumentList const&, bool&, bool&, std::optional<unsigned int>&) + 382
[build] 5  libclang-cpp.so.16 0x00007feee8039371
[build] 6  libclang-cpp.so.16 0x00007feee803f3ab
[build] 7  libclang-cpp.so.16 0x00007feee804d551
[build] 8  libclang-cpp.so.16 0x00007feee8044c79
[build] 9  libclang-cpp.so.16 0x00007feee8038d82 clang::Sema::SubstConstraintExpr(clang::Expr*, clang::MultiLevelTemplateArgumentList const&) + 82
[build] 10 libclang-cpp.so.16 0x00007feee7a66e17
[build] 11 libclang-cpp.so.16 0x00007feee7a65d09
[build] 12 libclang-cpp.so.16 0x00007feee7a60f6f
[build] 13 libclang-cpp.so.16 0x00007feee7a6091c clang::Sema::CheckConstraintSatisfaction(clang::NamedDecl const*, llvm::ArrayRef<clang::Expr const*>, llvm::SmallVectorImpl<clang::Expr*>&, clang::MultiLevelTemplateArgumentList const&, clang::SourceRange, clang::ConstraintSatisfaction&) + 796
[build] 14 libclang-cpp.so.16 0x00007feee7a63215 clang::Sema::CheckInstantiatedFunctionTemplateConstraints(clang::SourceLocation, clang::FunctionDecl*, llvm::ArrayRef<clang::TemplateArgument>, clang::ConstraintSatisfaction&) + 837
[build] 15 libclang-cpp.so.16 0x00007feee7fd837f clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*, llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool, llvm::function_ref<bool ()>) + 3423
[build] 16 libclang-cpp.so.16 0x00007feee802b837
[build] 17 libclang-cpp.so.16 0x00007feee792e56d clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) + 61
[build] 18 libclang-cpp.so.16 0x00007feee7fd9821 clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool, llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>) + 2353
[build] 19 libclang-cpp.so.16 0x00007feee7eb6670 clang::Sema::AddMethodTemplateCandidate(clang::FunctionTemplateDecl*, clang::DeclAccessPair, clang::CXXRecordDecl*, clang::TemplateArgumentListInfo*, clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool, clang::OverloadCandidateParamOrder) + 640
[build] 20 libclang-cpp.so.16 0x00007feee7eb7043 clang::Sema::AddMethodCandidate(clang::DeclAccessPair, clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, clang::OverloadCandidateParamOrder) + 211
[build] 21 libclang-cpp.so.16 0x00007feee7ecdee7 clang::Sema::BuildCallToObjectOfClassType(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation) + 983
[build] 22 libclang-cpp.so.16 0x00007feee7be7c71 clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, bool) + 2337
[build] 23 libclang-cpp.so.16 0x00007feee7bffdad clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*) + 77
[build] 24 libclang-cpp.so.16 0x00007feee803f4d1
[build] 25 libclang-cpp.so.16 0x00007feee8051bd7
[build] 26 libclang-cpp.so.16 0x00007feee8031590
[build] 27 libclang-cpp.so.16 0x00007feee8031f27 clang::Sema::SubstType(clang::QualType, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName) + 135
[build] 28 libclang-cpp.so.16 0x00007feee7f3123a clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation, clang::TemplateArgumentListInfo&) + 858
[build] 29 libclang-cpp.so.16 0x00007feee8048158
[build] 30 libclang-cpp.so.16 0x00007feee80556b5
[build] 31 libclang-cpp.so.16 0x00007feee805361f
[build] 32 libclang-cpp.so.16 0x00007feee8031590
[build] 33 libclang-cpp.so.16 0x00007feee803124c clang::Sema::SubstType(clang::TypeSourceInfo*, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName, bool) + 108
[build] 34 libclang-cpp.so.16 0x00007feee806770b clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*, bool) + 107
[build] 35 libclang-cpp.so.16 0x00007feee80687a1 clang::TemplateDeclInstantiator::VisitTypeAliasDecl(clang::TypeAliasDecl*) + 17
[build] 36 libclang-cpp.so.16 0x00007feee8035316 clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*, clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&, clang::TemplateSpecializationKind, bool) + 1590
[build] 37 libclang-cpp.so.16 0x00007feee80371a5 clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation, clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind, bool) + 2213
[build] 38 libclang-cpp.so.16 0x00007feee80e002e
[build] 39 libclang-cpp.so.16 0x00007feee792e56d clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) + 61
[build] 40 libclang-cpp.so.16 0x00007feee80d25fa clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*) + 1786
[build] 41 libclang-cpp.so.16 0x00007feee80d1dd0 clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser&) + 16
[build] 42 libclang-cpp.so.16 0x00007feee7cfd77f clang::Sema::BuildCXXTypeConstructExpr(clang::TypeSourceInfo*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, bool) + 2271
[build] 43 libclang-cpp.so.16 0x00007feee803f12a
[build] 44 libclang-cpp.so.16 0x00007feee805c445
[build] 45 libclang-cpp.so.16 0x00007feee8050240
[build] 46 libclang-cpp.so.16 0x00007feee8037bb4 clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) + 84
[build] 47 libclang-cpp.so.16 0x00007feee8077ee6 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) + 2662
[build] 48 libclang-cpp.so.16 0x00007feee792e56d clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) + 61
[build] 49 libclang-cpp.so.16 0x00007feee7fdcfc5 clang::Sema::DeduceReturnType(clang::FunctionDecl*, clang::SourceLocation, bool) + 741
[build] 50 libclang-cpp.so.16 0x00007feee7be2fde clang::Sema::DiagnoseUseOfDecl(clang::NamedDecl*, llvm::ArrayRef<clang::SourceLocation>, clang::ObjCInterfaceDecl const*, bool, bool, clang::ObjCInterfaceDecl*, bool) + 1102
[build] 51 libclang-cpp.so.16 0x00007feee7ec84c4
[build] 52 libclang-cpp.so.16 0x00007feee7ece99f clang::Sema::BuildCallToObjectOfClassType(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation) + 3727
[build] 53 libclang-cpp.so.16 0x00007feee7be7c71 clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, bool) + 2337
[build] 54 libclang-cpp.so.16 0x00007feee7bffdad clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*) + 77
[build] 55 libclang-cpp.so.16 0x00007feee7213c0c clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) + 5196
[build] 56 libclang-cpp.so.16 0x00007feee7214b25 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) + 213
[build] 57 libclang-cpp.so.16 0x00007feee7210da1 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 273
[build] 58 libclang-cpp.so.16 0x00007feee7210c79 clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
[build] 59 libclang-cpp.so.16 0x00007feee7274634 clang::Parser::ParseReturnStatement() + 260
[build] 60 libclang-cpp.so.16 0x00007feee726eca9 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 2649
[build] 61 libclang-cpp.so.16 0x00007feee726e01d clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) + 349
[build] 62 libclang-cpp.so.16 0x00007feee72764b0 clang::Parser::ParseCompoundStatementBody(bool) + 1600
[build] 63 libclang-cpp.so.16 0x00007feee727756f clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 175
[build] 64 libclang-cpp.so.16 0x00007feee71d2171 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 609
[build] 65 libclang-cpp.so.16 0x00007feee71d0e7a clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 74
[build] 66 libclang-cpp.so.16 0x00007feee7204b69 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) + 4457
[build] 67 libclang-cpp.so.16 0x00007feee7202416 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) + 7206
[build] 68 libclang-cpp.so.16 0x00007feee71e47e1 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) + 1857
[build] 69 libclang-cpp.so.16 0x00007feee72904c0 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 192
[build] 70 libclang-cpp.so.16 0x00007feee7290229 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 457
[build] 71 libclang-cpp.so.16 0x00007feee728f4c7 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 1943
[build] 72 libclang-cpp.so.16 0x00007feee71fae1d clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 301
[build] 73 libclang-cpp.so.16 0x00007feee71fa7be clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) + 4766
[build] 74 libclang-cpp.so.16 0x00007feee71df8a1 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) + 1169
[build] 75 libclang-cpp.so.16 0x00007feee728ede5 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 181
[build] 76 libclang-cpp.so.16 0x00007feee71fae1d clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 301
[build] 77 libclang-cpp.so.16 0x00007feee71fa7be clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) + 4766
[build] 78 libclang-cpp.so.16 0x00007feee71df8a1 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) + 1169
[build] 79 libclang-cpp.so.16 0x00007feee728ede5 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 181
[build] 80 libclang-cpp.so.16 0x00007feee728d86e clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 1182
[build] 81 libclang-cpp.so.16 0x00007feee71cd51e clang::ParseAST(clang::Sema&, bool, bool) + 718
[build] 82 libclang-cpp.so.16 0x00007feee8de4bd5 clang::FrontendAction::Execute() + 85
[build] 83 libclang-cpp.so.16 0x00007feee8d61dc4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 724
[build] 84 libclang-cpp.so.16 0x00007feee8e5d654 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 660
[build] 85 clang++-16         0x000055a4f63cff4c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2348
[build] 86 clang++-16         0x000055a4f63cd1f0
[build] 87 libclang-cpp.so.16 0x00007feee8a3e632
[build] 88 libLLVM-16.so.1    0x00007feedfcfce8c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 140
[build] 89 libclang-cpp.so.16 0x00007feee8a3dd53 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const + 355
[build] 90 libclang-cpp.so.16 0x00007feee8a095d2 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 866
[build] 91 libclang-cpp.so.16 0x00007feee8a0982e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const + 142
[build] 92 libclang-cpp.so.16 0x00007feee8a23f8d clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) + 349
[build] 93 clang++-16         0x000055a4f63cc8b5 clang_main(int, char**) + 11541
[build] 94 libc.so.6          0x00007feede629d90
[build] 95 libc.so.6          0x00007feede629e40 __libc_start_main + 128
[build] 96 clang++-16         0x000055a4f63c9855 _start + 37
[build] clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
[build] Ubuntu clang version 16.0.6 (++20230710042027+7cbf1a259152-1~exp1~20230710162048.105)
[build] Target: x86_64-pc-linux-gnu
[build] Thread model: posix
[build] InstalledDir: /usr/bin
[build] clang: note: diagnostic msg: 
[build] ********************
[build] 
[build] PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[build] Preprocessed source(s) and associated run script(s) are located at:
[build] clang: note: diagnostic msg: /tmp/hello_world-ef8864.cpp
[build] clang: note: diagnostic msg: /tmp/hello_world-ef8864.sh
[build] clang: note: diagnostic msg: 
[build] 
[build] ********************

hello_world.zip

Metadata

Metadata

Assignees

Labels

c++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsconfirmedVerified by a second partycrashPrefer [crash-on-valid] or [crash-on-invalid]

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions