Issue 167362
Summary [clang] Crash compiling Jank master
Labels clang
Assignees
Reporter tsliwkan
    Crash while compiling jank (https://github.com/jank-lang/jank) latest 

```[2944/4906] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o
FAILED: [code=1] tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o 
/usr/bin/clang++ -DCLANG_EXPORTS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm-build/tools/clang/lib/Sema -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/clang/lib/Sema -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/clang/include -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm-build/tools/clang/include -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm-build/include -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/llvm/include -fPIC -fexceptions -frtti -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -MD -MT tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o -MF tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o.d -o tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o -c /home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/clang/lib/Sema/SemaExprMember.cpp
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++ -DCLANG_EXPORTS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm-build/tools/clang/lib/Sema -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/clang/lib/Sema -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/clang/include -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm-build/tools/clang/include -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm-build/include -I/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/llvm/include -fPIC -fexceptions -frtti -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -MD -MT tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o -MF tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o.d -o tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExprMember.cpp.o -c /home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/clang/lib/Sema/SemaExprMember.cpp
1.	<eof> parser at end of file
2.	/home/tsliwkan/opt/jank-git/src/jank/compiler+runtime/build/llvm/llvm/include/llvm/ADT/TinyPtrVector.h:135:8: instantiating function definition 'llvm::TinyPtrVector<clang::LambdaCapture *>::empty'
 #0 0x00007f5bf790832d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/src/debug/llvm/llvm-21.1.5.src/lib/Support/Unix/Signals.inc:834:22
 #1 0x00007f5bf7905e07 llvm::sys::RunSignalHandlers() /usr/src/debug/llvm/llvm-21.1.5.src/lib/Support/Signals.cpp:104:20
 #2 0x00007f5bf7905e07 llvm::sys::CleanupOnSignal(unsigned long) /usr/src/debug/llvm/llvm-21.1.5.src/lib/Support/Unix/Signals.inc:373:31
 #3 0x00007f5bf77da7f9 HandleCrash /usr/src/debug/llvm/llvm-21.1.5.src/lib/Support/CrashRecoveryContext.cpp:73:5
 #4 0x00007f5bf77da7f9 CrashRecoverySignalHandler /usr/src/debug/llvm/llvm-21.1.5.src/lib/Support/CrashRecoveryContext.cpp:390:62
 #5 0x00007f5bf683e540 (/usr/lib/libc.so.6+0x3e540)
 #6 0x00007f5c013ca8ac clang::Stmt::getStmtClass() const /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/Stmt.h:1484:44
 #7 0x00007f5c013ca8ac clang::ImplicitCastExpr::classof(clang::Stmt const*) /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/Expr.h:3833:27
 #8 0x00007f5c013ca8ac llvm::isa_impl<clang::ImplicitCastExpr, clang::Expr, void>::doit(clang::Expr const&) /usr/include/llvm/Support/Casting.h:64:64
 #9 0x00007f5c013ca8ac llvm::isa_impl_cl<clang::ImplicitCastExpr, clang::Expr const*>::doit(clang::Expr const*) /usr/include/llvm/Support/Casting.h:110:36
#10 0x00007f5c013ca8ac llvm::isa_impl_wrap<clang::ImplicitCastExpr, clang::Expr const*, clang::Expr const*>::doit(clang::Expr const* const&) /usr/include/llvm/Support/Casting.h:137:41
#11 0x00007f5c013ca8ac llvm::isa_impl_wrap<clang::ImplicitCastExpr, clang::Expr* const, clang::Expr const*>::doit(clang::Expr* const&) /usr/include/llvm/Support/Casting.h:129:13
#12 0x00007f5c013ca8ac llvm::CastIsPossible<clang::ImplicitCastExpr, clang::Expr*, void>::isPossible(clang::Expr* const&) /usr/include/llvm/Support/Casting.h:257:62
#13 0x00007f5c013ca8ac llvm::CastInfo<clang::ImplicitCastExpr, clang::Expr*, void>::doCastIfPossible(clang::Expr* const&) /usr/include/llvm/Support/Casting.h:493:26
#14 0x00007f5c013ca8ac decltype(auto) llvm::dyn_cast<clang::ImplicitCastExpr, clang::Expr>(clang::Expr*) /usr/include/llvm/Support/Casting.h:663:48
#15 0x00007f5c013ca8ac clang::IgnoreImplicitCastsSingleStep(clang::Expr*) /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/IgnoreExpr.h:49:45
#16 0x00007f5c013ca8ac clang::Expr* clang::detail::IgnoreExprNodesImpl<clang::Expr* (&)(clang::Expr*)>(clang::Expr*, clang::Expr* (&)(clang::Expr*)) /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/IgnoreExpr.h:26:29
#17 0x00007f5c013ca8ac clang::Expr* clang::IgnoreExprNodes<clang::Expr* (&)(clang::Expr*)>(clang::Expr*, clang::Expr* (&)(clang::Expr*)) /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/IgnoreExpr.h:38:36
#18 0x00007f5c013ca8ac clang::Expr::IgnoreImpCasts() /usr/src/debug/clang/clang-21.1.5.src/lib/AST/Expr.cpp:3071:25
#19 0x00007f5c013ca8ac clang::Expr::getReferencedDeclOfCallee() /usr/src/debug/clang/clang-21.1.5.src/lib/AST/Expr.cpp:1550:29
#20 0x00007f5c013f0241 auto llvm::dyn_cast_if_present<clang::FunctionDecl, clang::Decl const>(clang::Decl const*) /usr/include/llvm/Support/Casting.h:751:3
#21 0x00007f5c013f0241 auto llvm::dyn_cast_or_null<clang::FunctionDecl, clang::Decl const>(clang::Decl const*) /usr/include/llvm/Support/Casting.h:768:32
#22 0x00007f5c013f0241 clang::CallExpr::getDirectCallee() const /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/Expr.h:3062:42
#23 0x00007f5c013f0241 clang::CallExpr::getBuiltinCallee() const /usr/src/debug/clang/clang-21.1.5.src/lib/AST/Expr.cpp:1592:38
#24 0x00007f5c0143cc93 IsConstantEvaluatedBuiltinCall /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:8061:12
#25 0x00007f5c0143cc93 VisitCallExpr /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:12933:38
#26 0x00007f5c0144ede9 Evaluate /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:16641:46
#27 0x00007f5c0144f7ee EvaluateAsRValue /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:16763:3
#28 0x00007f5c01450673 EvaluateAsRValue /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:16846:26
#29 0x00007f5c01450673 clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&, bool) const /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:16895:28
#30 0x00007f5c014507eb clang::Expr::EvaluateAsBooleanCondition(bool&, clang::ASTContext const&, bool) const (.constprop.0) /usr/src/debug/clang/clang-21.1.5.src/lib/AST/ExprConstant.cpp:16904:26
#31 0x00007f5c029fc5cb TryResult /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:408:27
#32 0x00007f5c029fc5cb evaluateAsBooleanConditionNoCache /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:1436:14
#33 0x00007f5c02a240e2 VisitIfStmt /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:3292:56
#34 0x00007f5c02a23b1d VisitCompoundStmt /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:2939:9
#35 0x00007f5c02a28092 addStmt /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:790:17
#36 0x00007f5c02a28092 buildCFG /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:1674:24
#37 0x00007f5c02a28092 clang::CFG::buildCFG(clang::Decl const*, clang::Stmt*, clang::ASTContext*, clang::CFG::BuildOptions const&) /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/CFG.cpp:5348:39
#38 0x00007f5c029f34be std::__uniq_ptr_impl<clang::CFG, std::default_delete<clang::CFG>>::release() /usr/include/c++/15.2.1/bits/unique_ptr.h:211:10
#39 0x00007f5c029f34be std::__uniq_ptr_impl<clang::CFG, std::default_delete<clang::CFG>>::operator=(std::__uniq_ptr_impl<clang::CFG, std::default_delete<clang::CFG>>&&) /usr/include/c++/15.2.1/bits/unique_ptr.h:185:7
#40 0x00007f5c029f34be std::__uniq_ptr_data<clang::CFG, std::default_delete<clang::CFG>, true, true>::operator=(std::__uniq_ptr_data<clang::CFG, std::default_delete<clang::CFG>, true, true>&&) /usr/include/c++/15.2.1/bits/unique_ptr.h:237:24
#41 0x00007f5c029f34be std::unique_ptr<clang::CFG, std::default_delete<clang::CFG>>::operator=(std::unique_ptr<clang::CFG, std::default_delete<clang::CFG>>&&) /usr/include/c++/15.2.1/bits/unique_ptr.h:409:19
#42 0x00007f5c029f34be clang::AnalysisDeclContext::getCFG() /usr/src/debug/clang/clang-21.1.5.src/lib/Analysis/AnalysisDeclContext.cpp:216:75
#43 0x00007f5c01afb7f1 CheckFallThrough /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/AnalysisBasedWarnings.cpp:569:23
#44 0x00007f5c01b06afd CheckFallThroughForBody /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/AnalysisBasedWarnings.cpp:830:49
#45 0x00007f5c01b06afd clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy, clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::QualType) /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/AnalysisBasedWarnings.cpp:2954:28
#46 0x00007f5c01b93978 clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy const*, clang::Decl const*, clang::QualType) /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/Sema.cpp:2457:35
#47 0x00007f5c01d82e39 std::unique_ptr<clang::sema::FunctionScopeInfo, clang::Sema::PoppedFunctionScopeDeleter>::~unique_ptr() /usr/include/c++/15.2.1/bits/unique_ptr.h:398:12
#48 0x00007f5c01d82e39 clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/SemaDecl.cpp:16687:23
#49 0x00007f5c023ed127 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/SemaTemplateInstantiateDecl.cpp:5856:32
#50 0x00007f5c023fa352 clang::FunctionDecl::isDefined() const /usr/src/debug/clang/clang-21.1.5.src/include/clang/AST/Decl.h:2257:21
#51 0x00007f5c023fa352 clang::Sema::PerformPendingInstantiations(bool, bool) (.constprop.0) /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/SemaTemplateInstantiateDecl.cpp:7105:32
#52 0x00007f5c01b9b1a4 llvm::TimeTraceScope::~TimeTraceScope() /usr/include/llvm/Support/TimeProfiler.h:200:5
#53 0x00007f5c01b9b1a4 clang::Sema::ActOnEndOfTranslationUnitFragment(clang::TUFragmentKind) /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/Sema.cpp:1223:3
#54 0x00007f5c01b9b501 clang::Sema::ActOnEndOfTranslationUnit() /usr/src/debug/clang/clang-21.1.5.src/lib/Sema/Sema.cpp:1252:9
#55 0x00007f5c01083ad7 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /usr/src/debug/clang/clang-21.1.5.src/lib/Parse/Parser.cpp:714:12
#56 0x00007f5c00f71589 clang::ParseAST(clang::Sema&, bool, bool) /usr/src/debug/clang/clang-21.1.5.src/lib/Parse/ParseAST.cpp:169:69
#57 0x00007f5c0304e8dc clang::CompilerInstance::shouldBuildGlobalModuleIndex() const /usr/src/debug/clang/clang-21.1.5.src/lib/Frontend/CompilerInstance.cpp:86:58
#58 0x00007f5c0304e8dc clang::FrontendAction::Execute() /usr/src/debug/clang/clang-21.1.5.src/lib/Frontend/FrontendAction.cpp:1225:38
#59 0x00007f5c02fafd4f llvm::Error::getPtr() const /usr/include/llvm/Support/Error.h:281:12
#60 0x00007f5c02fafd4f llvm::Error::operator bool() /usr/include/llvm/Support/Error.h:241:22
#61 0x00007f5c02fafd4f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /usr/src/debug/clang/clang-21.1.5.src/lib/Frontend/CompilerInstance.cpp:1055:42
#62 0x00007f5c030abb2c std::__shared_ptr<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2>::get() const /usr/include/c++/15.2.1/bits/shared_ptr_base.h:1673:16
#63 0x00007f5c030abb2c std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const /usr/include/c++/15.2.1/bits/shared_ptr_base.h:1370:69
#64 0x00007f5c030abb2c std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const /usr/include/c++/15.2.1/bits/shared_ptr_base.h:1358:40
#65 0x00007f5c030abb2c clang::CompilerInvocation::getFrontendOpts() /usr/src/debug/clang/clang-21.1.5.src/include/clang/Frontend/CompilerInvocation.h:259:48
#66 0x00007f5c030abb2c clang::CompilerInstance::getFrontendOpts() /usr/src/debug/clang/clang-21.1.5.src/include/clang/Frontend/CompilerInstance.h:304:39
#67 0x00007f5c030abb2c clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /usr/src/debug/clang/clang-21.1.5.src/lib/FrontendTool/ExecuteCompilerInvocation.cpp:300:29
#68 0x000055be2c00ce9a cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/src/debug/clang/clang-21.1.5.src/tools/driver/cc1_main.cpp:297:40
#69 0x000055be2c010b61 ExecuteCC1Tool /usr/src/debug/clang/clang-21.1.5.src/tools/driver/driver.cpp:223:20
#70 0x00007f5c02bf30b5 operator() /usr/src/debug/clang/clang-21.1.5.src/lib/Driver/Job.cpp:436:32
#71 0x00007f5c02bf30b5 callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef> >, std::string*, bool*) const::<lambda()> > /usr/include/llvm/ADT/STLFunctionalExtras.h:46:52
#72 0x00007f5bf77dac38 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /usr/src/debug/llvm/llvm-21.1.5.src/lib/Support/CrashRecoveryContext.cpp:428:1
#73 0x00007f5c02bfec75 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_stri<truncated>Please see the issue for the entire body.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to