llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.79k stars 10.98k forks source link

[AArch64] `target_version` multiversioned function crashes when defined as friend function #93058

Open MitalAshok opened 1 month ago

MitalAshok commented 1 month ago

https://godbolt.org/z/h1oE1sMb6

struct X {
    friend void foo[[gnu::target_version("sve")]]() {}
};
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: /cmake-build-debug/clang++ -target aarch64-linux-gnu -fsyntax-only test.cpp
1.      test.cpp:2:54: current parser token '}'
2.      test.cpp:1:1: parsing struct/union/class body 'X'
3.      test.cpp:2:53: parsing function body 'foo'
4.      test.cpp:2:53: in compound statement ('{}')
 #0 0x000055f307f0ac2d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:11
 #1 0x000055f307f0b11b PrintStackTraceSignalHandler(void*) /llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
 #2 0x000055f307f09186 llvm::sys::RunSignalHandlers() /llvm/llvm-project/llvm/lib/Support/Signals.cpp:105:5
 #3 0x000055f307f0a4ae llvm::sys::CleanupOnSignal(unsigned long) /llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:368:1
 #4 0x000055f307e36d74 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:7
 #5 0x000055f307e37112 CrashRecoverySignalHandler(int) /llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:391:1
 #6 0x00007fdc916ac520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #7 0x000055f307e6ca3c llvm::SmallVectorBase<unsigned int>::size() const /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:91:32
 #8 0x000055f30cae31dd clang::sema::CompoundScopeInfo const* llvm::SmallVectorTemplateCommon<clang::sema::CompoundScopeInfo, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true> >(llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true>*, clang::sema::CompoundScopeInfo const&, unsigned long) /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:244:35
 #9 0x000055f30cae3175 llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true>::reserveForParamAndGetAddress(clang::sema::CompoundScopeInfo&, unsigned long) /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:549:5#10 0x000055f30caba6a6 llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true>::push_back(clang::sema::CompoundScopeInfo) /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:575:23
#11 0x000055f30caab2f3 clang::Sema::PushCompoundScope(bool) /llvm/llvm-project/clang/lib/Sema/Sema.cpp:2291:1#12 0x000055f30dc0aee5 clang::Sema::ActOnStartOfCompoundStmt(bool) /llvm/llvm-project/clang/lib/Sema/SemaStmt.cpp:397:1
#13 0x000055f30c9cda63 clang::Sema::CompoundScopeRAII::CompoundScopeRAII(clang::Sema&, bool) /llvm/llvm-project/clang/include/clang/Sema/Sema.h:866:5
#14 0x000055f30c9c9d22 clang::Parser::ParseCompoundStatementBody(bool) /llvm/llvm-project/clang/lib/Parse/ParseStmt.cpp:1186:27
#15 0x000055f30c9cb847 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /llvm/llvm-project/clang/lib/Parse/ParseStmt.cpp:2518:21
#16 0x000055f30c9be9c0 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) /llvm/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:0:3
#17 0x000055f30c9be459 clang::Parser::LexedMethod::ParseLexedMethodDefs() /llvm/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:321:1
#18 0x000055f30c9bd43a clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) /llvm/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:574:33
#19 0x000055f30c9658da clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) /llvm/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3826:5
#20 0x000055f30c963ac1 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) /llvm/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:2269:7
#21 0x000055f30c9a0430 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) /llvm/llvm-project/clang/lib/Parse/ParseDecl.cpp:4607:23
#22 0x000055f30c8f6aa2 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /llvm/llvm-project/clang/include/clang/Parse/Parser.h:2496:5
#23 0x000055f30c8ef428 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:1158:7
#24 0x000055f30c8eef4e clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:1271:12#25 0x000055f30c8ee7ca clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:1074:14
#26 0x000055f30c8ec60c clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:763:12
#27 0x000055f30c8ebcb0 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:608:8
#28 0x000055f30c8e729b clang::ParseAST(clang::Sema&, bool, bool) /llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:162:15
#29 0x000055f30941a871 clang::ASTFrontendAction::ExecuteAction() /llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1194:1
#30 0x000055f30941a28c clang::FrontendAction::Execute() /llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1082:7
#31 0x000055f30933830a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1061:23
#32 0x000055f3095f360e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:280:8
#33 0x000055f306062ce1 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /llvm/llvm-project/clang/tools/driver/cc1_main.cpp:232:13
#34 0x000055f3060556b2 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /llvm/llvm-project/clang/tools/driver/driver.cpp:215:5
#35 0x000055f30605615d clang_main(int, char**, llvm::ToolContext const&)::$_0::operator()(llvm::SmallVectorImpl<char const*>&) const /llvm/llvm-project/clang/tools/driver/driver.cpp:355:7
#36 0x000055f30605612d int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::$_0>(long, llvm::SmallVectorImpl<char const*>&) /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#37 0x000055f3091b88b1 llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::operator()(llvm::SmallVectorImpl<char const*>&) const /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#38 0x000055f3091b5588 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1::operator()() const /llvm/llvm-project/clang/lib/Driver/Job.cpp:440:34
#39 0x000055f3091b5555 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::$_1>(long) /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
#40 0x000055f306b16459 llvm::function_ref<void ()>::operator()() const /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
#41 0x000055f307e36b8a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:427:3
#42 0x000055f3091b4eeb clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const /llvm/llvm-project/clang/lib/Driver/Job.cpp:440:7
#43 0x000055f3091502ef clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const /llvm/llvm-project/clang/lib/Driver/Compilation.cpp:199:15
#44 0x000055f3091504f7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&, bool) const /llvm/llvm-project/clang/lib/Driver/Compilation.cpp:253:13
#45 0x000055f30916b0b2 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /llvm/llvm-project/clang/lib/Driver/Driver.cpp:1942:7
#46 0x000055f30605518b clang_main(int, char**, llvm::ToolContext const&) /llvm/llvm-project/clang/tools/driver/driver.cpp:391:9
#47 0x000055f306087f85 main /cmake-build-debug/tools/clang/tools/driver/clang-driver.cpp:17:3
#48 0x00007fdc91693d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#49 0x00007fdc91693e40 call_init ./csu/../csu/libc-start.c:128:20
#50 0x00007fdc91693e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#51 0x000055f306053ea5 _start (/cmake-build-debug/clang+++0x5a59ea5)
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 19.0.0git (https://github.com/llvm/llvm-project.git 919df9d75ac2a721a8072327c803f34486884571)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /cmake-build-debug/bin
Build config: +unoptimized, +assertions
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/test-ac25ab.cpp
clang++: note: diagnostic msg: /tmp/test-ac25ab.sh
clang++: note: diagnostic msg:

********************
llvmbot commented 1 month ago

@llvm/issue-subscribers-clang-frontend

Author: Mital Ashok (MitalAshok)

https://godbolt.org/z/h1oE1sMb6 ```c++ struct X { friend void foo[[gnu::target_version("sve")]]() {} }; ``` ``` 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: /cmake-build-debug/clang++ -target aarch64-linux-gnu -fsyntax-only test.cpp 1. test.cpp:2:54: current parser token '}' 2. test.cpp:1:1: parsing struct/union/class body 'X' 3. test.cpp:2:53: parsing function body 'foo' 4. test.cpp:2:53: in compound statement ('{}') #0 0x000055f307f0ac2d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:11 #1 0x000055f307f0b11b PrintStackTraceSignalHandler(void*) /llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1 #2 0x000055f307f09186 llvm::sys::RunSignalHandlers() /llvm/llvm-project/llvm/lib/Support/Signals.cpp:105:5 #3 0x000055f307f0a4ae llvm::sys::CleanupOnSignal(unsigned long) /llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:368:1 #4 0x000055f307e36d74 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:7 #5 0x000055f307e37112 CrashRecoverySignalHandler(int) /llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:391:1 #6 0x00007fdc916ac520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #7 0x000055f307e6ca3c llvm::SmallVectorBase<unsigned int>::size() const /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:91:32 #8 0x000055f30cae31dd clang::sema::CompoundScopeInfo const* llvm::SmallVectorTemplateCommon<clang::sema::CompoundScopeInfo, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true> >(llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true>*, clang::sema::CompoundScopeInfo const&, unsigned long) /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:244:35 #9 0x000055f30cae3175 llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true>::reserveForParamAndGetAddress(clang::sema::CompoundScopeInfo&, unsigned long) /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:549:5#10 0x000055f30caba6a6 llvm::SmallVectorTemplateBase<clang::sema::CompoundScopeInfo, true>::push_back(clang::sema::CompoundScopeInfo) /llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:575:23 #11 0x000055f30caab2f3 clang::Sema::PushCompoundScope(bool) /llvm/llvm-project/clang/lib/Sema/Sema.cpp:2291:1#12 0x000055f30dc0aee5 clang::Sema::ActOnStartOfCompoundStmt(bool) /llvm/llvm-project/clang/lib/Sema/SemaStmt.cpp:397:1 #13 0x000055f30c9cda63 clang::Sema::CompoundScopeRAII::CompoundScopeRAII(clang::Sema&, bool) /llvm/llvm-project/clang/include/clang/Sema/Sema.h:866:5 #14 0x000055f30c9c9d22 clang::Parser::ParseCompoundStatementBody(bool) /llvm/llvm-project/clang/lib/Parse/ParseStmt.cpp:1186:27 #15 0x000055f30c9cb847 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /llvm/llvm-project/clang/lib/Parse/ParseStmt.cpp:2518:21 #16 0x000055f30c9be9c0 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) /llvm/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:0:3 #17 0x000055f30c9be459 clang::Parser::LexedMethod::ParseLexedMethodDefs() /llvm/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:321:1 #18 0x000055f30c9bd43a clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) /llvm/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:574:33 #19 0x000055f30c9658da clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) /llvm/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3826:5 #20 0x000055f30c963ac1 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) /llvm/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:2269:7 #21 0x000055f30c9a0430 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) /llvm/llvm-project/clang/lib/Parse/ParseDecl.cpp:4607:23 #22 0x000055f30c8f6aa2 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /llvm/llvm-project/clang/include/clang/Parse/Parser.h:2496:5 #23 0x000055f30c8ef428 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:1158:7 #24 0x000055f30c8eef4e clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:1271:12#25 0x000055f30c8ee7ca clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:1074:14 #26 0x000055f30c8ec60c clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:763:12 #27 0x000055f30c8ebcb0 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /llvm/llvm-project/clang/lib/Parse/Parser.cpp:608:8 #28 0x000055f30c8e729b clang::ParseAST(clang::Sema&, bool, bool) /llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:162:15 #29 0x000055f30941a871 clang::ASTFrontendAction::ExecuteAction() /llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1194:1 #30 0x000055f30941a28c clang::FrontendAction::Execute() /llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1082:7 #31 0x000055f30933830a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1061:23 #32 0x000055f3095f360e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:280:8 #33 0x000055f306062ce1 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /llvm/llvm-project/clang/tools/driver/cc1_main.cpp:232:13 #34 0x000055f3060556b2 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /llvm/llvm-project/clang/tools/driver/driver.cpp:215:5 #35 0x000055f30605615d clang_main(int, char**, llvm::ToolContext const&)::$_0::operator()(llvm::SmallVectorImpl<char const*>&) const /llvm/llvm-project/clang/tools/driver/driver.cpp:355:7 #36 0x000055f30605612d int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::$_0>(long, llvm::SmallVectorImpl<char const*>&) /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5 #37 0x000055f3091b88b1 llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::operator()(llvm::SmallVectorImpl<char const*>&) const /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5 #38 0x000055f3091b5588 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1::operator()() const /llvm/llvm-project/clang/lib/Driver/Job.cpp:440:34 #39 0x000055f3091b5555 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::$_1>(long) /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5 #40 0x000055f306b16459 llvm::function_ref<void ()>::operator()() const /llvm/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5 #41 0x000055f307e36b8a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:427:3 #42 0x000055f3091b4eeb clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const /llvm/llvm-project/clang/lib/Driver/Job.cpp:440:7 #43 0x000055f3091502ef clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const /llvm/llvm-project/clang/lib/Driver/Compilation.cpp:199:15 #44 0x000055f3091504f7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&, bool) const /llvm/llvm-project/clang/lib/Driver/Compilation.cpp:253:13 #45 0x000055f30916b0b2 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /llvm/llvm-project/clang/lib/Driver/Driver.cpp:1942:7 #46 0x000055f30605518b clang_main(int, char**, llvm::ToolContext const&) /llvm/llvm-project/clang/tools/driver/driver.cpp:391:9 #47 0x000055f306087f85 main /cmake-build-debug/tools/clang/tools/driver/clang-driver.cpp:17:3 #48 0x00007fdc91693d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #49 0x00007fdc91693e40 call_init ./csu/../csu/libc-start.c:128:20 #50 0x00007fdc91693e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #51 0x000055f306053ea5 _start (/cmake-build-debug/clang+++0x5a59ea5) clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 19.0.0git (https://github.com/llvm/llvm-project.git 919df9d75ac2a721a8072327c803f34486884571) Target: aarch64-unknown-linux-gnu Thread model: posix InstalledDir: /cmake-build-debug/bin Build config: +unoptimized, +assertions clang++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++: note: diagnostic msg: /tmp/test-ac25ab.cpp clang++: note: diagnostic msg: /tmp/test-ac25ab.sh clang++: note: diagnostic msg: ******************** ```
shafik commented 1 month ago

Confirmed, looks like this started after clang-15: https://godbolt.org/z/TnKKcEWbo