-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[Crash] Clang does not like vtables in structural templates. #124673
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
needs-reduction
Large reproducer that should be reduced into a simpler form
Comments
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
Jan 28, 2025
@llvm/issue-subscribers-clang-frontend Author: Oliver (Oliver-makes-code)
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: /usr/bin/clang -DDBG=0 -DFASTNOISE_STATIC_LIB -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_DEPTH_ZERO_TO_ONE -DGLM_FORCE_QUAT_DATA_XYZW -DIS_MACOS=0 -DIS_WINDOWS=0 -DSIMD_AVX2=1 -DSIMD_NEON=0 -D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR -I/home/octal/data/projects/native/Stratalia/submodule/glm -I/home/octal/data/projects/native/Stratalia/submodule/stb -I/home/octal/data/projects/native/Stratalia/submodule/magic_enum/include -I/home/octal/data/projects/native/Stratalia/submodule/json/include -I/home/octal/data/projects/native/Stratalia/submodule/FastNoise2/include -I/home/octal/data/projects/native/Stratalia/submodule/QjsCpp/include -I/home/octal/data/projects/native/Stratalia/submodule/QjsCpp/quickjs -I/home/octal/data/projects/native/Stratalia/common -I/home/octal/data/projects/native/Stratalia/submodule/SDL/include -I/home/octal/data/projects/native/Stratalia/vkb -I/home/octal/data/projects/native/Stratalia/submodule/imgui -I/home/octal/data/projects/native/Stratalia/submodule/imgui/backends -I/home/octal/data/projects/native/Stratalia/submodule/VulkanMemoryAllocator/include -I/home/octal/data/projects/native/Stratalia/submodule/Vulkan-Headers/include -I/home/octal/data/projects/native/Stratalia/submodule/Vulkan-Utility-Libraries/include -I/home/octal/data/projects/native/Stratalia/client -I/home/octal/data/projects/native/Stratalia/submodule/shaderc/libshaderc/include -I/home/octal/data/projects/native/Stratalia/build/submodule/SDL/include-revision -mavx2 -O2 -g -DNDEBUG -std=gnu++23 -fPIE -fdeclspec -Wno-parentheses-equality -ggdb3 -Wno-unused-command-line-argument -Wno-nullability-completeness -Wno-deprecated-anon-enum-enum-conversion -Wno-nan-infinity-disabled -Wno-deprecated-declarations -Wno-c++11-narrowing -Wl,--threads -Wl,--thread-count,THREAD_COUNT -MD -MT CMakeFiles/client.dir/client/runtime/model/part.cpp.o -MF CMakeFiles/client.dir/client/runtime/model/part.cpp.o.d -o CMakeFiles/client.dir/client/runtime/model/part.cpp.o -c /home/octal/data/projects/native/Stratalia/client/runtime/model/part.cpp
1. <eof> parser at end of file
2. Per-file LLVM IR generation
#0 0x00007387be81a730 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/Unix/Signals.inc:723:22
#1 0x00007387be817bf5 llvm::sys::RunSignalHandlers() /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/Signals.cpp:105:20
#2 0x00007387be817bf5 llvm::sys::CleanupOnSignal(unsigned long) /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/Unix/Signals.inc:367:31
#3 0x00007387be701319 HandleCrash /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/CrashRecoveryContext.cpp:73:5
#4 0x00007387be701319 CrashRecoverySignalHandler /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/CrashRecoveryContext.cpp:390:62
#5 0x00007387bda4c1d0 (/usr/lib/libc.so.6+0x3d1d0)
#6 0x00007387c82fce62 clang::Decl::getKind() const /usr/src/debug/clang/clang-19.1.7.src/include/clang/AST/DeclBase.h:448:51
#7 0x00007387c82fce62 clang::ClassTemplateSpecializationDecl::classof(clang::Decl const*) /usr/src/debug/clang/clang-19.1.7.src/include/clang/AST/DeclTemplate.h:2065:58
#8 0x00007387c82fce62 llvm::isa_impl<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl, void>::doit(clang::CXXRecordDecl const&) /usr/include/llvm/Support/Casting.h:64:64
#9 0x00007387c82fce62 llvm::isa_impl_cl<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl const*>::doit(clang::CXXRecordDecl const*) /usr/include/llvm/Support/Casting.h:110:36
#10 0x00007387c82fce62 llvm::isa_impl_wrap<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl const*, clang::CXXRecordDecl const*>::doit(clang::CXXRecordDecl const* const&) /usr/include/llvm/Support/Casting.h:137:41
#11 0x00007387c82fce62 llvm::isa_impl_wrap<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl const* const, clang::CXXRecordDecl const*>::doit(clang::CXXRecordDecl const* const&) /usr/include/llvm/Support/Casting.h:129:13
#12 0x00007387c82fce62 llvm::CastIsPossible<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl const*, void>::isPossible(clang::CXXRecordDecl const* const&) /usr/include/llvm/Support/Casting.h:257:62
#13 0x00007387c82fce62 llvm::CastInfo<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl const*, void>::doCastIfPossible(clang::CXXRecordDecl const* const&) /usr/include/llvm/Support/Casting.h:493:26
#14 0x00007387c82fce62 decltype(auto) llvm::dyn_cast<clang::ClassTemplateSpecializationDecl, clang::CXXRecordDecl const>(clang::CXXRecordDecl const*) /usr/include/llvm/Support/Casting.h:663:48
#15 0x00007387c82fce62 clang::CXXRecordDecl::getTemplateSpecializationKind() const /usr/src/debug/clang/clang-19.1.7.src/lib/AST/DeclCXX.cpp:1945:67
#16 0x00007387c82fce62 clang::CodeGen::CodeGenVTables::isVTableExternal(clang::CXXRecordDecl const*) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CGVTables.cpp:1218:69
#17 0x00007387c82fce62 shouldEmitVTableAtEndOfTranslationUnit /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CGVTables.cpp:1250:41
#18 0x00007387c82fce62 clang::CodeGen::CodeGenModule::EmitDeferredVTables() /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CGVTables.cpp:1268:47
#19 0x00007387c8338088 clang::CodeGen::CodeGenModule::getLangOpts() const /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenModule.h:760:0
#20 0x00007387c8338088 clang::CodeGen::CodeGenModule::EmitDeferred() /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenModule.cpp:3191:0
#21 0x00007387c833aeaa llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, clang::GlobalDecl, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, clang::GlobalDecl>>, llvm::StringRef, clang::GlobalDecl, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, clang::GlobalDecl>>::getBucketsEnd() /usr/include/llvm/ADT/DenseMap.h:572:0
#22 0x00007387c833aeaa llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, clang::GlobalDecl, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, clang::GlobalDecl>>, llvm::StringRef, clang::GlobalDecl, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, clang::GlobalDecl>>::end() /usr/include/llvm/ADT/DenseMap.h:85:0
#23 0x00007387c833aeaa clang::CodeGen::CodeGenModule::Release() /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenModule.cpp:850:0
#24 0x00007387c83d0256 HandleTranslationUnit /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/ModuleBuilder.cpp:291:0
#25 0x00007387c82ff5ed clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenAction.cpp:278:5
#26 0x00007387c6dd9c86 __gnu_cxx::__normal_iterator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>*, std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>::__normal_iterator(std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>* const&) /usr/include/c++/14.2.1/bits/stl_iterator.h:1068:0
#27 0x00007387c6dd9c86 std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>::begin() /usr/include/c++/14.2.1/bits/stl_vector.h:874:0
#28 0x00007387c6dd9c86 void clang::finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>(std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>&, clang::Sema const&) /usr/src/debug/clang/clang-19.1.7.src/include/clang/Sema/TemplateInstCallback.h:54:0
#29 0x00007387c6dd9c86 clang::ParseAST(clang::Sema&, bool, bool) /usr/src/debug/clang/clang-19.1.7.src/lib/Parse/ParseAST.cpp:191:0
#30 0x00007387c8afa221 clang::FrontendAction::Execute() /usr/src/debug/clang/clang-19.1.7.src/lib/Frontend/FrontendAction.cpp:1078:21
#31 0x00007387c8a9008f llvm::Error::getPtr() const /usr/include/llvm/Support/Error.h:282:12
#32 0x00007387c8a9008f llvm::Error::operator bool() /usr/include/llvm/Support/Error.h:242:22
#33 0x00007387c8a9008f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /usr/src/debug/clang/clang-19.1.7.src/lib/Frontend/CompilerInstance.cpp:1061:42
#34 0x00007387c8b54ba5 std::__shared_ptr<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2>::get() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1667:0
#35 0x00007387c8b54ba5 std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1364:0
#36 0x00007387c8b54ba5 std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1350:0
#37 0x00007387c8b54ba5 clang::CompilerInvocation::getFrontendOpts() /usr/src/debug/clang/clang-19.1.7.src/include/clang/Frontend/CompilerInvocation.h:259:0
#38 0x00007387c8b54ba5 clang::CompilerInstance::getFrontendOpts() /usr/src/debug/clang/clang-19.1.7.src/include/clang/Frontend/CompilerInstance.h:312:0
#39 0x00007387c8b54ba5 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /usr/src/debug/clang/clang-19.1.7.src/lib/FrontendTool/ExecuteCompilerInvocation.cpp:281:0
#40 0x00005cea4c714832 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/src/debug/clang/clang-19.1.7.src/tools/driver/cc1_main.cpp:284:40
#41 0x00005cea4c71904e ExecuteCC1Tool /usr/src/debug/clang/clang-19.1.7.src/tools/driver/driver.cpp:215:20
#42 0x00007387c8764bb5 operator() /usr/src/debug/clang/clang-19.1.7.src/lib/Driver/Job.cpp:440:32
#43 0x00007387c8764bb5 callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef> >, std::string*, bool*) const::<lambda()> > /usr/include/llvm/ADT/STLFunctionalExtras.h:45:52
#44 0x00007387be70176a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /usr/src/debug/llvm/llvm-19.1.7.src/lib/Support/CrashRecoveryContext.cpp:428:1
#45 0x00007387c876bb76 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const /usr/src/debug/clang/clang-19.1.7.src/lib/Driver/Job.cpp:444:10
#46 0x00007387c8722709 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const /usr/src/debug/clang/clang-19.1.7.src/lib/Driver/Compilation.cpp:200:3
#47 0x00007387c8722afc clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const /usr/src/debug/clang/clang-19.1.7.src/lib/Driver/Compilation.cpp:253:5
#48 0x00007387c8792a64 llvm::SmallVectorBase<unsigned int>::empty() const /usr/include/llvm/ADT/SmallVector.h:95:46
#49 0x00007387c8792a64 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) /usr/src/debug/clang/clang-19.1.7.src/lib/Driver/Driver.cpp:1946:28
#50 0x00005cea4c71ad8c llvm::SmallVectorBase<unsigned int>::size() const /usr/include/llvm/ADT/SmallVector.h:92:32
#51 0x00005cea4c71ad8c llvm::SmallVectorTemplateCommon<std::pair<int, clang::driver::Command const*>, void>::end() /usr/include/llvm/ADT/SmallVector.h:283:41
#52 0x00005cea4c71ad8c clang_main(int, char**, llvm::ToolContext const&) /usr/src/debug/clang/clang-19.1.7.src/tools/driver/driver.cpp:393:26
#53 0x00005cea4c70cf65 main /usr/src/debug/clang/clang-19.1.7.src/build/tools/driver/clang-driver.cpp:18:1
#54 0x00007387bda34e08 __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#55 0x00007387bda34ecc call_init /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:128:20
#56 0x00007387bda34ecc __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:347:5
#57 0x00005cea4c70cfc5 _start (/usr/bin/clang+0xafc5)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 19.1.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Here's the files it asked me to include |
shafik
added
the
needs-reduction
Large reproducer that should be reduced into a simpler form
label
Jan 28, 2025
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"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
needs-reduction
Large reproducer that should be reduced into a simpler form
Here's the files it asked me to include
part-4f6327.zip
The text was updated successfully, but these errors were encountered: