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][C++ modules] crash of clang #117440

Open
Arthapz opened this issue Nov 23, 2024 · 2 comments
Open

[clang][C++ modules] crash of clang #117440

Arthapz opened this issue Nov 23, 2024 · 2 comments
Labels
clang:modules C++20 modules and Clang Header Modules crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@Arthapz
Copy link

Arthapz commented Nov 23, 2024

Hello, i noticed that clangd was constantly crashing with --experimental-modules-support on one of my project
after recompiled llvm in debug mode, my project doesn't compile anymore and clang crash when parsing a specific module (100% of the time, while in with clang in release mode, the crash only occurs sometimes), i don't know if clangd crashing is related to this issues (it was something wrong about AST deserialisation) but here the repro and the scanner

❯ /opt/llvm-git/bin/clang --version
clang version 20.0.0 (/home/arthapz/AUR/llvm-git/llvm-project d121d71fc7fcb8c969959147f5f58b31f9c6b251)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm-git/bin
Build config: +unoptimized, +assertions

https://github.com/Arthapz/clang-crash-modules-117440

❯ xmake b -v
[ 38%]: <foo> compiling.module.release DynamicLoader:Base
/opt/llvm-git/bin/clang -c -Qunused-arguments -m64 -std=c++26 -stdlib=libc++ -cxx-isystem/opt/llvm-git/include/c++/v1 -fmodule-file=Pimpl=build/.gens/foo/linux/x86_64/release/rules/bmi/cache/modules/3319d13e/Pimpl.pcm -fmodule-file=std=build/.gens/foo/li
error: clang-20: /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/DeclCXX.h:2610: void clang::CXXConstructorDecl::setExplicitSpecifier(ExplicitSpecifier): Assertion `(!ES.getExpr() || CXXConstructorDeclBits.HasTrailingExplicitSpecifier
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/llvm-git/bin/clang-20 -cc1 -triple x86_64-pc-linux-gnu -emit-module-interface -disable-free -clear-ast-before-backend -main-file-name DynamicLoader-Base.mpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=a
1.      src/DynamicLoader-Base.mpp:46:40: current parser token ';'
2.      src/DynamicLoader-Base.mpp:7:8: parsing namespace 'stormkit'
3.      src/DynamicLoader-Base.mpp:7:36: parsing namespace 'stormkit::core'
4.      src/DynamicLoader-Base.mpp:8:5: parsing struct/union/class body 'stormkit::DynamicLoader'
5.      /home/arthapz/Repos/qkdmqlksdlmqkdq/src/Pimpl.mpp:10:11: instantiating class definition 'stormkit::Pimpl<stormkit::DynamicLoader::DynamicLoaderImpl>'
 #0 0x00007782da8c8961 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:11
 #1 0x00007782da8c8f6f PrintStackTraceSignalHandler(void*) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
 #2 0x00007782da8c6bc7 llvm::sys::RunSignalHandlers() /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Signals.cpp:105:5
 #3 0x00007782da8c9735 SignalHandler(int) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #4 0x00007782d8e4c1d0 (/usr/lib/libc.so.6+0x3d1d0)
 #5 0x00007782d8ea53f4 (/usr/lib/libc.so.6+0x963f4)
 #6 0x00007782d8e4c120 raise (/usr/lib/libc.so.6+0x3d120)
 #7 0x00007782d8e334c3 abort (/usr/lib/libc.so.6+0x244c3)
 #8 0x00007782d8e333df (/usr/lib/libc.so.6+0x243df)
 #9 0x00007782d8e44177 (/usr/lib/libc.so.6+0x35177)
#10 0x00007782e4d64269 clang::CXXConstructorDecl::setExplicitSpecifier(clang::ExplicitSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/DeclCXX.h:2611:12
#11 0x00007782e907130b clang::ASTDeclReader::VisitCXXConstructorDecl(clang::CXXConstructorDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2320:7
#12 0x00007782e90a231c clang::declvisitor::Base<std::add_pointer, clang::ASTDeclReader, void>::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project-build/tools/clang/include/clang/AST/DeclNodes.inc:258:1
#13 0x00007782e9063b38 clang::ASTDeclReader::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:550:37
#14 0x00007782e90a177f clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4180:63
#15 0x00007782e90a1759 void llvm::function_ref<void ()>::callback_fn<clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1>(long) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:5
#16 0x00007782e433cd9d llvm::function_ref<void ()>::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#17 0x00007782e433d06e clang::runWithSufficientStackSpace(llvm::function_ref<void ()>, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Basic/Stack.h:52:3
#18 0x00007782e433ce19 clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Basic/StackExhaustionHandler.cpp:21:1
#19 0x00007782e5c03a81 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/Sema.cpp:565:1
#20 0x00007782e8fbf89f clang::ASTReader::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:9664:5
#21 0x00007782e909bb55 clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4184:40
#22 0x00007782e8faf5eb clang::ASTReader::GetDecl(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:7977:5
#23 0x00007782e90352d6 clang::NamedDecl* clang::ASTReader::ReadDeclAs<clang::NamedDecl>(clang::serialization::ModuleFile&, llvm::SmallVectorImpl<unsigned long> const&, unsigned int&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Seriali
#24 0x00007782e8fde61c clang::NamedDecl* clang::ASTRecordReader::readDeclAs<clang::NamedDecl>() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Serialization/ASTRecordReader.h:203:5
#25 0x00007782e90a35dd clang::NamedDecl* clang::ASTDeclReader::readDeclAs<clang::NamedDecl>() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:197:43
#26 0x00007782e9071980 clang::ASTDeclReader::VisitTemplateDecl(clang::TemplateDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2398:11
#27 0x00007782e9071eac clang::ASTDeclReader::VisitRedeclarableTemplateDecl(clang::RedeclarableTemplateDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2446:3
#28 0x00007782e90727ab clang::ASTDeclReader::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2584:31
#29 0x00007782e90a256e clang::declvisitor::Base<std::add_pointer, clang::ASTDeclReader, void>::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project-build/tools/clang/include/clang/AST/DeclNodes.inc:518:1
#30 0x00007782e9063b38 clang::ASTDeclReader::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:550:37
#31 0x00007782e90a177f clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4180:63
#32 0x00007782e90a1759 void llvm::function_ref<void ()>::callback_fn<clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1>(long) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:5
#33 0x00007782e433cd9d llvm::function_ref<void ()>::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#34 0x00007782e433d06e clang::runWithSufficientStackSpace(llvm::function_ref<void ()>, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Basic/Stack.h:52:3
#35 0x00007782e433ce19 clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Basic/StackExhaustionHandler.cpp:21:1
#36 0x00007782e5c03a81 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/Sema.cpp:565:1
#37 0x00007782e8fbf89f clang::ASTReader::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:9664:5
#38 0x00007782e909bb55 clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4184:40
#39 0x00007782e8faf5eb clang::ASTReader::GetDecl(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:7977:5
#40 0x00007782e8fe3856 clang::ASTReader::ReadDecl(clang::serialization::ModuleFile&, llvm::SmallVectorImpl<unsigned long> const&, unsigned int&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Serialization/ASTReader.h:2045:5
#41 0x00007782e909ea4c clang::ASTReader::loadPendingDeclChain(clang::Decl*, unsigned long) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4420:15
#42 0x00007782e8fc0ab2 clang::ASTReader::finishPendingActions() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:9871:57
#43 0x00007782e8fc3e7a clang::ASTReader::FinishedDeserializing() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:0:5
#44 0x00007782e4d19fb0 clang::ExternalASTSource::Deserializing::~Deserializing() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/ExternalASTSource.h:89:5
#45 0x00007782e4d3e5d4 clang::DeclContext::LoadLexicalDeclsFromExternalStorage() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/AST/DeclBase.cpp:1590:1
#46 0x00007782e4d3e9c0 clang::DeclContext::decls_begin() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/AST/DeclBase.cpp:0:5
#47 0x00007782e4667bea clang::DeclContext::decls() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/DeclBase.h:2353:48
#48 0x00007782e6abda4e clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*, clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&, clang::TemplateSpecializationKind, bool) /home/arthapz/AUR/llvm-git/src/llvm-project/c
#49 0x00007782e6abf5d7 clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation, clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind, bool) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaTemplateIns
#50 0x00007782e6cb0f83 clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*)::$_0::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaType.c
#51 0x00007782e6cb0f29 void llvm::function_ref<void ()>::callback_fn<clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*)::$_0>(long) /home/arthapz/AUR/llvm-git/src/llvm-
#52 0x00007782e433cd9d llvm::function_ref<void ()>::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#53 0x00007782e433d06e clang::runWithSufficientStackSpace(llvm::function_ref<void ()>, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Basic/Stack.h:52:3
#54 0x00007782e433ce19 clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Basic/StackExhaustionHandler.cpp:21:1
#55 0x00007782e5c03a81 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/Sema.cpp:565:1
#56 0x00007782e6c8c54b clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaType.cpp:9335:22
#57 0x00007782e6c8bd04 clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaType.cpp:9056:7
#58 0x00007782e5f4c483 bool clang::Sema::RequireCompleteSizedType<>(clang::SourceLocation, clang::QualType, unsigned int) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Sema/Sema.h:7829:12
#59 0x00007782e5f23df7 clang::Sema::CheckFieldDecl(clang::DeclarationName, clang::QualType, clang::TypeSourceInfo*, clang::RecordDecl*, clang::SourceLocation, bool, clang::Expr*, clang::InClassInitStyle, clang::SourceLocation, clang::AccessSpecifier, cla
#60 0x00007782e5f23ac5 clang::Sema::HandleField(clang::Scope*, clang::RecordDecl*, clang::SourceLocation, clang::Declarator&, clang::Expr*, clang::InClassInitStyle, clang::AccessSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaDe
#61 0x00007782e5fdf452 clang::Sema::ActOnCXXMemberDeclarator(clang::Scope*, clang::AccessSpecifier, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>, clang::Expr*, clang::VirtSpecifiers const&, clang::InClassInitStyle) /home/artha
#62 0x00007782e4682a59 clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::ParsingDeclRAIIObject*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDec
#63 0x00007782e46846f6 clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&, clang::ParsedAttributes&, clang::TypeSpecifierType, clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3742:1
#64 0x00007782e467e715 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3946:7
#65 0x00007782e467c8ea clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) /home/ar
#66 0x00007782e4642439 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) /home/artha
#67 0x00007782e4657d26 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /home/arthapz/AUR/llvm-git/src/llvm-project
#68 0x00007782e4787f91 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1153:7
#69 0x00007782e4787a1a clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1266:12
#70 0x00007782e478711a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1069:14
#71 0x00007782e4673455 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) /home/arthapz/AUR/llvm-git/src/ll
#72 0x00007782e4672cc1 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:252:18
#73 0x00007782e4639133 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDecl.cpp
#74 0x00007782e4786d66 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1017:16
#75 0x00007782e4673455 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) /home/arthapz/AUR/llvm-git/src/ll
#76 0x00007782e4672cc1 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:252:18
#77 0x00007782e46392a6 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDecl.cpp
#78 0x00007782e4786b76 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:985:14
#79 0x00007782e4674027 clang::Parser::ParseExportDeclaration() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:473:5
#80 0x00007782e4786b31 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:970:18
#81 0x00007782e4784be2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:758:12
#82 0x00007782e4614fc8 clang::ParseAST(clang::Sema&, bool, bool) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseAST.cpp:171:16
#83 0x00007782e94a1f15 clang::ASTFrontendAction::ExecuteAction() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1193:1
#84 0x00007782e94a182d clang::FrontendAction::Execute() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1081:7
#85 0x00007782e93aeae5 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1062:23
#86 0x00007782e95c0cee clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:296:8
#87 0x000064feedc1fc20 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/tools/driver/cc1_main.cpp:286:13
#88 0x000064feedc12234 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/tools/driver/driver.cpp:218:5
#89 0x000064feedc10ed0 clang_main(int, char**, llvm::ToolContext const&) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/tools/driver/driver.cpp:259:5
#90 0x000064feedc4836e main /home/arthapz/AUR/llvm-git/src/llvm-project-build/tools/clang/tools/driver/clang-driver.cpp:17:10
#91 0x00007782d8e34e08 (/usr/lib/libc.so.6+0x25e08)
#92 0x00007782d8e34ecc __libc_start_main (/usr/lib/libc.so.6+0x25ecc)
#93 0x000064feedc108e5 _start (/opt/llvm-git/bin/clang-20+0x1a8e5)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 20.0.0 (/home/arthapz/AUR/llvm-git/llvm-project d121d71fc7fcb8c969959147f5f58b31f9c6b251)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm-git/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/DynamicLoader-Base-f419b1.cppm
clang: note: diagnostic msg: /tmp/DynamicLoader-Base-f419b1.sh
clang: note: diagnostic msg:
********************
@github-actions github-actions bot added the clang Clang issues not falling into any other category label Nov 23, 2024
@EugeneZelenko EugeneZelenko added clang:modules C++20 modules and Clang Header Modules crash Prefer [crash-on-valid] or [crash-on-invalid] and removed clang Clang issues not falling into any other category labels Nov 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 23, 2024

@llvm/issue-subscribers-clang-modules

Author: Arthur Laurent (Arthapz)

Hello, i noticed that clangd was constantly crashing with --experimental-modules-support on one of my project after recompiled llvm in debug mode, my project doesn't compile anymore and clang crash when parsing a specific module (100% of the time, while in with clang in release mode, the crash only occurs sometimes), i don't know if clangd crashing is related to this issues (it was something wrong about AST deserialisation) but here the repro and the scanner
❯ /opt/llvm-git/bin/clang --version
clang version 20.0.0 (/home/arthapz/AUR/llvm-git/llvm-project d121d71fc7fcb8c969959147f5f58b31f9c6b251)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm-git/bin
Build config: +unoptimized, +assertions

https://github.com/Arthapz/clang-crash-modules-117440

❯ xmake b -v
[ 38%]: &lt;foo&gt; compiling.module.release DynamicLoader:Base
/opt/llvm-git/bin/clang -c -Qunused-arguments -m64 -std=c++26 -stdlib=libc++ -cxx-isystem/opt/llvm-git/include/c++/v1 -fmodule-file=Pimpl=build/.gens/foo/linux/x86_64/release/rules/bmi/cache/modules/3319d13e/Pimpl.pcm -fmodule-file=std=build/.gens/foo/li
error: clang-20: /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/DeclCXX.h:2610: void clang::CXXConstructorDecl::setExplicitSpecifier(ExplicitSpecifier): Assertion `(!ES.getExpr() || CXXConstructorDeclBits.HasTrailingExplicitSpecifier
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/llvm-git/bin/clang-20 -cc1 -triple x86_64-pc-linux-gnu -emit-module-interface -disable-free -clear-ast-before-backend -main-file-name DynamicLoader-Base.mpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=a
1.      src/DynamicLoader-Base.mpp:46:40: current parser token ';'
2.      src/DynamicLoader-Base.mpp:7:8: parsing namespace 'stormkit'
3.      src/DynamicLoader-Base.mpp:7:36: parsing namespace 'stormkit::core'
4.      src/DynamicLoader-Base.mpp:8:5: parsing struct/union/class body 'stormkit::DynamicLoader'
5.      /home/arthapz/Repos/qkdmqlksdlmqkdq/src/Pimpl.mpp:10:11: instantiating class definition 'stormkit::Pimpl&lt;stormkit::DynamicLoader::DynamicLoaderImpl&gt;'
 #<!-- -->0 0x00007782da8c8961 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:11
 #<!-- -->1 0x00007782da8c8f6f PrintStackTraceSignalHandler(void*) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
 #<!-- -->2 0x00007782da8c6bc7 llvm::sys::RunSignalHandlers() /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Signals.cpp:105:5
 #<!-- -->3 0x00007782da8c9735 SignalHandler(int) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #<!-- -->4 0x00007782d8e4c1d0 (/usr/lib/libc.so.6+0x3d1d0)
 #<!-- -->5 0x00007782d8ea53f4 (/usr/lib/libc.so.6+0x963f4)
 #<!-- -->6 0x00007782d8e4c120 raise (/usr/lib/libc.so.6+0x3d120)
 #<!-- -->7 0x00007782d8e334c3 abort (/usr/lib/libc.so.6+0x244c3)
 #<!-- -->8 0x00007782d8e333df (/usr/lib/libc.so.6+0x243df)
 #<!-- -->9 0x00007782d8e44177 (/usr/lib/libc.so.6+0x35177)
#<!-- -->10 0x00007782e4d64269 clang::CXXConstructorDecl::setExplicitSpecifier(clang::ExplicitSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/DeclCXX.h:2611:12
#<!-- -->11 0x00007782e907130b clang::ASTDeclReader::VisitCXXConstructorDecl(clang::CXXConstructorDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2320:7
#<!-- -->12 0x00007782e90a231c clang::declvisitor::Base&lt;std::add_pointer, clang::ASTDeclReader, void&gt;::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project-build/tools/clang/include/clang/AST/DeclNodes.inc:258:1
#<!-- -->13 0x00007782e9063b38 clang::ASTDeclReader::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:550:37
#<!-- -->14 0x00007782e90a177f clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4180:63
#<!-- -->15 0x00007782e90a1759 void llvm::function_ref&lt;void ()&gt;::callback_fn&lt;clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1&gt;(long) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:5
#<!-- -->16 0x00007782e433cd9d llvm::function_ref&lt;void ()&gt;::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#<!-- -->17 0x00007782e433d06e clang::runWithSufficientStackSpace(llvm::function_ref&lt;void ()&gt;, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Basic/Stack.h:52:3
#<!-- -->18 0x00007782e433ce19 clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Basic/StackExhaustionHandler.cpp:21:1
#<!-- -->19 0x00007782e5c03a81 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/Sema.cpp:565:1
#<!-- -->20 0x00007782e8fbf89f clang::ASTReader::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:9664:5
#<!-- -->21 0x00007782e909bb55 clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4184:40
#<!-- -->22 0x00007782e8faf5eb clang::ASTReader::GetDecl(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:7977:5
#<!-- -->23 0x00007782e90352d6 clang::NamedDecl* clang::ASTReader::ReadDeclAs&lt;clang::NamedDecl&gt;(clang::serialization::ModuleFile&amp;, llvm::SmallVectorImpl&lt;unsigned long&gt; const&amp;, unsigned int&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Seriali
#<!-- -->24 0x00007782e8fde61c clang::NamedDecl* clang::ASTRecordReader::readDeclAs&lt;clang::NamedDecl&gt;() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Serialization/ASTRecordReader.h:203:5
#<!-- -->25 0x00007782e90a35dd clang::NamedDecl* clang::ASTDeclReader::readDeclAs&lt;clang::NamedDecl&gt;() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:197:43
#<!-- -->26 0x00007782e9071980 clang::ASTDeclReader::VisitTemplateDecl(clang::TemplateDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2398:11
#<!-- -->27 0x00007782e9071eac clang::ASTDeclReader::VisitRedeclarableTemplateDecl(clang::RedeclarableTemplateDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2446:3
#<!-- -->28 0x00007782e90727ab clang::ASTDeclReader::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:2584:31
#<!-- -->29 0x00007782e90a256e clang::declvisitor::Base&lt;std::add_pointer, clang::ASTDeclReader, void&gt;::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project-build/tools/clang/include/clang/AST/DeclNodes.inc:518:1
#<!-- -->30 0x00007782e9063b38 clang::ASTDeclReader::Visit(clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:550:37
#<!-- -->31 0x00007782e90a177f clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4180:63
#<!-- -->32 0x00007782e90a1759 void llvm::function_ref&lt;void ()&gt;::callback_fn&lt;clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID)::$_1&gt;(long) /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:5
#<!-- -->33 0x00007782e433cd9d llvm::function_ref&lt;void ()&gt;::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#<!-- -->34 0x00007782e433d06e clang::runWithSufficientStackSpace(llvm::function_ref&lt;void ()&gt;, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Basic/Stack.h:52:3
#<!-- -->35 0x00007782e433ce19 clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Basic/StackExhaustionHandler.cpp:21:1
#<!-- -->36 0x00007782e5c03a81 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/Sema.cpp:565:1
#<!-- -->37 0x00007782e8fbf89f clang::ASTReader::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:9664:5
#<!-- -->38 0x00007782e909bb55 clang::ASTReader::ReadDeclRecord(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4184:40
#<!-- -->39 0x00007782e8faf5eb clang::ASTReader::GetDecl(clang::GlobalDeclID) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:7977:5
#<!-- -->40 0x00007782e8fe3856 clang::ASTReader::ReadDecl(clang::serialization::ModuleFile&amp;, llvm::SmallVectorImpl&lt;unsigned long&gt; const&amp;, unsigned int&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Serialization/ASTReader.h:2045:5
#<!-- -->41 0x00007782e909ea4c clang::ASTReader::loadPendingDeclChain(clang::Decl*, unsigned long) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4420:15
#<!-- -->42 0x00007782e8fc0ab2 clang::ASTReader::finishPendingActions() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:9871:57
#<!-- -->43 0x00007782e8fc3e7a clang::ASTReader::FinishedDeserializing() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Serialization/ASTReader.cpp:0:5
#<!-- -->44 0x00007782e4d19fb0 clang::ExternalASTSource::Deserializing::~Deserializing() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/ExternalASTSource.h:89:5
#<!-- -->45 0x00007782e4d3e5d4 clang::DeclContext::LoadLexicalDeclsFromExternalStorage() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/AST/DeclBase.cpp:1590:1
#<!-- -->46 0x00007782e4d3e9c0 clang::DeclContext::decls_begin() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/AST/DeclBase.cpp:0:5
#<!-- -->47 0x00007782e4667bea clang::DeclContext::decls() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/AST/DeclBase.h:2353:48
#<!-- -->48 0x00007782e6abda4e clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*, clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&amp;, clang::TemplateSpecializationKind, bool) /home/arthapz/AUR/llvm-git/src/llvm-project/c
#<!-- -->49 0x00007782e6abf5d7 clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation, clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind, bool) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaTemplateIns
#<!-- -->50 0x00007782e6cb0f83 clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*)::$_0::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaType.c
#<!-- -->51 0x00007782e6cb0f29 void llvm::function_ref&lt;void ()&gt;::callback_fn&lt;clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*)::$_0&gt;(long) /home/arthapz/AUR/llvm-git/src/llvm-
#<!-- -->52 0x00007782e433cd9d llvm::function_ref&lt;void ()&gt;::operator()() const /home/arthapz/AUR/llvm-git/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#<!-- -->53 0x00007782e433d06e clang::runWithSufficientStackSpace(llvm::function_ref&lt;void ()&gt;, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Basic/Stack.h:52:3
#<!-- -->54 0x00007782e433ce19 clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Basic/StackExhaustionHandler.cpp:21:1
#<!-- -->55 0x00007782e5c03a81 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref&lt;void ()&gt;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/Sema.cpp:565:1
#<!-- -->56 0x00007782e6c8c54b clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaType.cpp:9335:22
#<!-- -->57 0x00007782e6c8bd04 clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaType.cpp:9056:7
#<!-- -->58 0x00007782e5f4c483 bool clang::Sema::RequireCompleteSizedType&lt;&gt;(clang::SourceLocation, clang::QualType, unsigned int) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/include/clang/Sema/Sema.h:7829:12
#<!-- -->59 0x00007782e5f23df7 clang::Sema::CheckFieldDecl(clang::DeclarationName, clang::QualType, clang::TypeSourceInfo*, clang::RecordDecl*, clang::SourceLocation, bool, clang::Expr*, clang::InClassInitStyle, clang::SourceLocation, clang::AccessSpecifier, cla
#<!-- -->60 0x00007782e5f23ac5 clang::Sema::HandleField(clang::Scope*, clang::RecordDecl*, clang::SourceLocation, clang::Declarator&amp;, clang::Expr*, clang::InClassInitStyle, clang::AccessSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Sema/SemaDe
#<!-- -->61 0x00007782e5fdf452 clang::Sema::ActOnCXXMemberDeclarator(clang::Scope*, clang::AccessSpecifier, clang::Declarator&amp;, llvm::MutableArrayRef&lt;clang::TemplateParameterList*&gt;, clang::Expr*, clang::VirtSpecifiers const&amp;, clang::InClassInitStyle) /home/artha
#<!-- -->62 0x00007782e4682a59 clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::ParsedAttributes&amp;, clang::Parser::ParsedTemplateInfo&amp;, clang::ParsingDeclRAIIObject*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDec
#<!-- -->63 0x00007782e46846f6 clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&amp;, clang::ParsedAttributes&amp;, clang::TypeSpecifierType, clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3742:1
#<!-- -->64 0x00007782e467e715 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&amp;, unsigned int, clang::Decl*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3946:7
#<!-- -->65 0x00007782e467c8ea clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&amp;, clang::Parser::ParsedTemplateInfo&amp;, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&amp;) /home/ar
#<!-- -->66 0x00007782e4642439 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&amp;, clang::Parser::ParsedTemplateInfo&amp;, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) /home/artha
#<!-- -->67 0x00007782e4657d26 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&amp;, clang::Parser::ParsedTemplateInfo&amp;, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /home/arthapz/AUR/llvm-git/src/llvm-project
#<!-- -->68 0x00007782e4787f91 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec&amp;, clang::AccessSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1153:7
#<!-- -->69 0x00007782e4787a1a clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*, clang::AccessSpecifier) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1266:12
#<!-- -->70 0x00007782e478711a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1069:14
#<!-- -->71 0x00007782e4673455 clang::Parser::ParseInnerNamespace(llvm::SmallVector&lt;clang::Parser::InnerNamespaceInfo, 4u&gt; const&amp;, unsigned int, clang::SourceLocation&amp;, clang::ParsedAttributes&amp;, clang::BalancedDelimiterTracker&amp;) /home/arthapz/AUR/llvm-git/src/ll
#<!-- -->72 0x00007782e4672cc1 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&amp;, clang::SourceLocation) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:252:18
#<!-- -->73 0x00007782e4639133 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&amp;, clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::SourceLocation*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDecl.cpp
#<!-- -->74 0x00007782e4786d66 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:1017:16
#<!-- -->75 0x00007782e4673455 clang::Parser::ParseInnerNamespace(llvm::SmallVector&lt;clang::Parser::InnerNamespaceInfo, 4u&gt; const&amp;, unsigned int, clang::SourceLocation&amp;, clang::ParsedAttributes&amp;, clang::BalancedDelimiterTracker&amp;) /home/arthapz/AUR/llvm-git/src/ll
#<!-- -->76 0x00007782e4672cc1 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&amp;, clang::SourceLocation) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:252:18
#<!-- -->77 0x00007782e46392a6 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&amp;, clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::SourceLocation*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDecl.cpp
#<!-- -->78 0x00007782e4786b76 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:985:14
#<!-- -->79 0x00007782e4674027 clang::Parser::ParseExportDeclaration() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:473:5
#<!-- -->80 0x00007782e4786b31 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:970:18
#<!-- -->81 0x00007782e4784be2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&lt;clang::DeclGroupRef&gt;&amp;, clang::Sema::ModuleImportState&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/Parser.cpp:758:12
#<!-- -->82 0x00007782e4614fc8 clang::ParseAST(clang::Sema&amp;, bool, bool) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Parse/ParseAST.cpp:171:16
#<!-- -->83 0x00007782e94a1f15 clang::ASTFrontendAction::ExecuteAction() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1193:1
#<!-- -->84 0x00007782e94a182d clang::FrontendAction::Execute() /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1081:7
#<!-- -->85 0x00007782e93aeae5 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1062:23
#<!-- -->86 0x00007782e95c0cee clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:296:8
#<!-- -->87 0x000064feedc1fc20 cc1_main(llvm::ArrayRef&lt;char const*&gt;, char const*, void*) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/tools/driver/cc1_main.cpp:286:13
#<!-- -->88 0x000064feedc12234 ExecuteCC1Tool(llvm::SmallVectorImpl&lt;char const*&gt;&amp;, llvm::ToolContext const&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/tools/driver/driver.cpp:218:5
#<!-- -->89 0x000064feedc10ed0 clang_main(int, char**, llvm::ToolContext const&amp;) /home/arthapz/AUR/llvm-git/src/llvm-project/clang/tools/driver/driver.cpp:259:5
#<!-- -->90 0x000064feedc4836e main /home/arthapz/AUR/llvm-git/src/llvm-project-build/tools/clang/tools/driver/clang-driver.cpp:17:10
#<!-- -->91 0x00007782d8e34e08 (/usr/lib/libc.so.6+0x25e08)
#<!-- -->92 0x00007782d8e34ecc __libc_start_main (/usr/lib/libc.so.6+0x25ecc)
#<!-- -->93 0x000064feedc108e5 _start (/opt/llvm-git/bin/clang-20+0x1a8e5)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 20.0.0 (/home/arthapz/AUR/llvm-git/llvm-project d121d71fc7fcb8c969959147f5f58b31f9c6b251)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm-git/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/DynamicLoader-Base-f419b1.cppm
clang: note: diagnostic msg: /tmp/DynamicLoader-Base-f419b1.sh
clang: note: diagnostic msg:
********************

@Arthapz
Copy link
Author

Arthapz commented Nov 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:modules C++20 modules and Clang Header Modules crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

3 participants