Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang 18.1 parser crash #91536

Closed
drzdv opened this issue May 8, 2024 · 2 comments · Fixed by #93490
Closed

clang 18.1 parser crash #91536

drzdv opened this issue May 8, 2024 · 2 comments · Fixed by #93490
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash-on-invalid

Comments

@drzdv
Copy link

drzdv commented May 8, 2024

Godbolt link: https://godbolt.org/z/obG6EThzd
clang trunk W/ assertions: https://godbolt.org/z/aWKnWh5co

decltype([]()->decltype(this){})

Produces following output:

Assertion:

clang++: /root/llvm-project/clang/include/clang/AST/Type.h:956:
const clang::ExtQualsTypeCommonBase* clang::QualType::getCommonPtr() const:
Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' failed.

Backtrace:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -std=c++20 <source>
1.	<source>:1:29: current parser token ')'
2.	<source>:1:10: lambda expression parsing
 #0 0x000000000397dfb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x397dfb8)
 #1 0x000000000397bc9c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x397bc9c)
 #2 0x00000000038ccd48 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007989c6a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007989c6a969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007989c6a42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007989c6a287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007989c6a2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007989c6a39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x000000000747c033 (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x747c033)
#10 0x0000000007482c64 clang::FunctionDecl::getNumParams() const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x7482c64)
#11 0x0000000007482ed9 clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter() const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x7482ed9)
#12 0x000000000694720e clang::Sema::CheckCXXThisType(clang::SourceLocation, clang::QualType) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x694720e)
#13 0x0000000006948bc1 clang::Sema::ActOnCXXThis(clang::SourceLocation) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6948bc1)
#14 0x00000000063007ee clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63007ee)
#15 0x00000000063031aa clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63031aa)
#16 0x0000000006303349 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6303349)
#17 0x0000000006307cb9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6307cb9)
#18 0x00000000062e4e9b clang::Parser::ParseDecltypeSpecifier(clang::DeclSpec&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62e4e9b)
#19 0x000000000631b6cf clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&, clang::OpaquePtr<clang::QualType>, bool, bool, bool*, bool, clang::IdentifierInfo const**, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x631b6cf)
#20 0x000000000628bc93 clang::Parser::TryAnnotateCXXScopeToken(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x628bc93)
#21 0x00000000062d28c0 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62d28c0)
#22 0x00000000062d3c21 clang::Parser::ParseSpecifierQualifierList(clang::DeclSpec&, clang::ImplicitTypenameContext, clang::AccessSpecifier, clang::Parser::DeclSpecContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62d3c21)
#23 0x00000000062daaf0 clang::Parser::ParseTypeName(clang::SourceRange*, clang::DeclaratorContext, clang::AccessSpecifier, clang::Decl**, clang::ParsedAttributes*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62daaf0)
#24 0x0000000006322db8 clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6322db8)
#25 0x000000000632313b clang::Parser::ParseLambdaExpression() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x632313b)
#26 0x0000000006301715 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6301715)
#27 0x00000000063031aa clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63031aa)
#28 0x0000000006303349 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6303349)
#29 0x0000000006307cb9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6307cb9)
#30 0x00000000062e4e9b clang::Parser::ParseDecltypeSpecifier(clang::DeclSpec&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62e4e9b)
#31 0x000000000631b6cf clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&, clang::OpaquePtr<clang::QualType>, bool, bool, bool*, bool, clang::IdentifierInfo const**, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x631b6cf)
#32 0x000000000628bc93 clang::Parser::TryAnnotateCXXScopeToken(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x628bc93)
#33 0x00000000062d28c0 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62d28c0)
#34 0x000000000628c257 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x628c257)
#35 0x000000000628cc53 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x628cc53)
#36 0x0000000006293257 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6293257)
#37 0x000000000629410f clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x629410f)
#38 0x00000000062945d0 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62945d0)
#39 0x0000000006287b9c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6287b9c)
#40 0x0000000004249738 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4249738)
#41 0x00000000044cc3c9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44cc3c9)
#42 0x0000000004453cee clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4453cee)
#43 0x00000000045b2f2e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x45b2f2e)
#44 0x0000000000c50a6c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc50a6c)
#45 0x0000000000c49dca ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#46 0x000000000428d239 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#47 0x00000000038cd1f4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x38cd1f4)
#48 0x000000000428d82f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#49 0x0000000004253925 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4253925)
#50 0x000000000425438d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x425438d)
#51 0x000000000425c085 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x425c085)
#52 0x0000000000c4df75 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc4df75)
#53 0x0000000000b2fc04 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xb2fc04)
#54 0x00007989c6a29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#55 0x00007989c6a29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#56 0x0000000000c4987e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc4987e)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
@github-actions github-actions bot added the clang Clang issues not falling into any other category label May 8, 2024
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" crash Prefer [crash-on-valid] or [crash-on-invalid] and removed clang Clang issues not falling into any other category labels May 8, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented May 8, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (drzdv)

Godbolt link: https://godbolt.org/z/obG6EThzd ```cpp decltype([]()->decltype(this){}) ``` Produces following output:

> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
> Stack dump:
> 0. Program arguments: /opt/compiler-explorer/clang-18.1.0/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-13.2.0 -fcolor-diagnostics -fno-crash-diagnostics -std=c++20 <source>
> 1. <source>:1:29: current parser token ')'
> 2. <source>:1:10: lambda expression parsing
> #0 0x000000000351ae38 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x351ae38)
> #1 0x0000000003518f84 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3518f84)
> #2 0x0000000003467018 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
> #3 0x00007bad21242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
> #4 0x0000000006c0342c clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter() const (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x6c0342c)
> #5 0x000000000623bb95 clang::Sema::ActOnCXXThis(clang::SourceLocation) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x623bb95)
> #6 0x0000000005c0f1f5 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c0f1f5)
> #7 0x0000000005c1197a clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c1197a)
> #8 0x0000000005c11b19 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c11b19)
> #9 0x0000000005c16fa9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c16fa9)
> #10 0x0000000005bf311e clang::Parser::ParseDecltypeSpecifier(clang::DeclSpec&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5bf311e)
> #11 0x0000000005c2be9b clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&, clang::OpaquePtr<clang::QualType>, bool, bool, bool*, bool, clang::IdentifierInfo**, bool, bool) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c2be9b)
> #12 0x0000000005b999bc clang::Parser::TryAnnotateCXXScopeToken(bool) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5b999bc)
> #13 0x0000000005bd8750 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5bd8750)
> #14 0x0000000005bd9a93 clang::Parser::ParseSpecifierQualifierList(clang::DeclSpec&, clang::ImplicitTypenameContext, clang::AccessSpecifier, clang::Parser::DeclSpecContext) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5bd9a93)
> #15 0x0000000005bda13f clang::Parser::ParseTypeName(clang::SourceRange*, clang::DeclaratorContext, clang::AccessSpecifier, clang::Decl**, clang::ParsedAttributes*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5bda13f)
> #16 0x0000000005c31f30 clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c31f30)
> #17 0x0000000005c3281b clang::Parser::ParseLambdaExpression() (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c3281b)
> #18 0x0000000005c100e5 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c100e5)
> #19 0x0000000005c1197a clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c1197a)
> #20 0x0000000005c11b19 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c11b19)
> #21 0x0000000005c16fa9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c16fa9)
> #22 0x0000000005bf311e clang::Parser::ParseDecltypeSpecifier(clang::DeclSpec&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5bf311e)
> #23 0x0000000005c2be9b clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&, clang::OpaquePtr<clang::QualType>, bool, bool, bool*, bool, clang::IdentifierInfo**, bool, bool) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5c2be9b)
> #24 0x0000000005b999bc clang::Parser::TryAnnotateCXXScopeToken(bool) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5b999bc)
> #25 0x0000000005bd8750 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5bd8750)
> #26 0x0000000005b9c10d clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5b9c10d)
> #27 0x0000000005b9d011 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5b9d011)
> #28 0x0000000005ba53af clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5ba53af)
> #29 0x0000000005ba6f27 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5ba6f27)
> #30 0x0000000005ba7540 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5ba7540)
> #31 0x0000000005b9638a clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x5b9638a)
> #32 0x0000000003d5a725 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3d5a725)
> #33 0x0000000003fe2aa1 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3fe2aa1)
> #34 0x0000000003f6010b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3f6010b)
> #35 0x00000000040c2473 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x40c2473)
> #36 0x0000000000c19746 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0xc19746)
> #37 0x0000000000c1211d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
> #38 0x0000000003da1979 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) const::'lambda'()>(long) Job.cpp:0:0
> #39 0x0000000003467443 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3467443)
> #40 0x0000000003da1b99 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) const (.part.0) Job.cpp:0:0
> #41 0x0000000003d69d17 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3d69d17)
> #42 0x0000000003d6a6cd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3d6a6cd)
> #43 0x0000000003d7445c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0x3d7445c)
> #44 0x0000000000c16a21 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0xc16a21)
> #45 0x0000000000b0fa84 main (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0xb0fa84)
> #46 0x00007bad21229d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
> #47 0x00007bad21229e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
> #48 0x0000000000c1191e _start (/opt/compiler-explorer/clang-18.1.0/bin/clang+++0xc1191e)
> clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
> Compiler returned: 139

@shafik
Copy link
Collaborator

shafik commented May 8, 2024

Confirmed, I added clang trunk assertions result b/c assertions often failure earlier and closer to the problem and frequently give us more clues to solving the issue.

@shafik shafik added the confirmed Verified by a second party label May 8, 2024
cor3ntin pushed a commit that referenced this issue May 28, 2024
Skip explicit this check in non-valid scopes due to `null` type in
lambdas with invalid captures or incomplete parameter lists during
parsing


Fixes #91536
@EugeneZelenko EugeneZelenko removed the crash Prefer [crash-on-valid] or [crash-on-invalid] label May 28, 2024
vg0204 pushed a commit to vg0204/llvm-project that referenced this issue May 29, 2024
…3490)

Skip explicit this check in non-valid scopes due to `null` type in
lambdas with invalid captures or incomplete parameter lists during
parsing


Fixes llvm#91536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash-on-invalid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants