Date: Tue, 26 May 2026 05:09:36 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 295597] clang crashes: DeclRefExpr for Decl not entered in LocalDeclMap? (testcase: science/sirius) Message-ID: <bug-295597-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295597 Bug ID: 295597 Summary: clang crashes: DeclRefExpr for Decl not entered in LocalDeclMap? (testcase: science/sirius) Product: Base System Version: 16.0-CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: yuri@freebsd.org Log: DeclRefExpr for Decl not entered in LocalDeclMap? UNREACHABLE executed at /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp:3260! PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/bin/c++ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -O3 -std=gnu++20 -fPIC -fopenmp=libomp -DFMT_SHARED -DH5_BUILT_AS_DYNAMIC_LIB -DSIRIUS_GPU_MEMORY_ALIGMENT= -DSIRIUS_PROFILE -Dsirius_cxx_EXPORTS -I/wrkdirs/usr/ports/science/sirius/work/SIRIUS-7.11.1/src -I/wrkdirs/usr/ports/science/sirius/work/.build/src -isystem /usr/local/include -isystem /usr/local/include/spfft -isystem /usr/local/include/json-c -isystem /usr/local/include/gcc14 -isystem /usr/local/include/spla -DNDEBUG -c -o CMakeFiles/sirius_cxx.dir/radial/radial_integrals.cpp.o /wrkdirs/usr/ports/science/sirius/work/SIRIUS-7.11.1/src/radial/radial_integrals.cpp 1. <eof> parser at end of file 2. Per-file LLVM IR generation 3. /wrkdirs/usr/ports/science/sirius/work/SIRIUS-7.11.1/src/radial/radial_integrals.cpp:66:33: Generating code for declaration 'sirius::Radial_integrals_aug<true>::generate' 4. /wrkdirs/usr/ports/science/sirius/work/SIRIUS-7.11.1/src/radial/radial_integrals.cpp:71:65: LLVM IR generation of compound statement ('{}') #0 0x0000266871b801c6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libprivatellvm.so.21+0x43801c6) #1 0x0000266871b7dc03 llvm::sys::RunSignalHandlers() (/usr/lib/libprivatellvm.so.21+0x437dc03) #2 0x0000266871b21c62 (/usr/lib/libprivatellvm.so.21+0x4321c62) #3 0x00002668760fe8ec (/lib/libthr.so.3+0x1a8ec) #4 0x00002668760fdf0b (/lib/libthr.so.3+0x19f0b) #5 0x0000266866e722d3 ([vdso]+0x2d3) #6 0x0000266879009d8a _thr_kill (/lib/libsys.so.7+0x19d8a) #7 0x0000266878183564 raise (/lib/libc.so.7+0xc8564) #8 0x0000266878235279 abort (/lib/libc.so.7+0x17a279) #9 0x0000266871b34f52 (/usr/lib/libprivatellvm.so.21+0x4334f52) #10 0x0000266869dfbe24 clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/usr/lib/libprivateclang.so.21+0x1ffbe24) #11 0x0000266869df8e4c clang::CodeGen::CodeGenFunction::EmitLValueHelper(clang::Expr const*, clang::CodeGen::KnownNonNull_t) (/usr/lib/libprivateclang.so.21+0x1ff8e4c) #12 0x0000266869e17ac1 (/usr/lib/libprivateclang.so.21+0x2017ac1) #13 0x0000266869c2faef clang::StackExhaustionHandler::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) (/usr/lib/libprivateclang.so.21+0x1e2faef) #14 0x0000266869dec942 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*, clang::CodeGen::KnownNonNull_t) (/usr/lib/libprivateclang.so.21+0x1fec942) #15 0x0000266869e29f56 clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(clang::CallExpr const*, clang::CXXMethodDecl const*, clang::CodeGen::ReturnValueSlot, bool, clang::NestedNameSpecifier*, bool, clang::Expr const*, llvm::CallBase**) (/usr/lib/libprivateclang.so.21+0x2029f56) #16 0x0000266869e2b1a4 clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(clang::CXXOperatorCallExpr const*, clang::CXXMethodDecl const*, clang::CodeGen::ReturnValueSlot, llvm::CallBase**) (/usr/lib/libprivateclang.so.21+0x202b1a4) #17 0x0000266869e117eb clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, llvm::CallBase**) (/usr/lib/libprivateclang.so.21+0x20117eb) #18 0x0000266869e6abf9 (/usr/lib/libprivateclang.so.21+0x206abf9) #19 0x0000266869e579ec clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/usr/lib/libprivateclang.so.21+0x20579ec) #20 0x0000266869dec0b9 clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(clang::Expr const*) (/usr/lib/libprivateclang.so.21+0x1fec0b9) #21 0x000026686a02033f clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(clang::Expr const*, llvm::BasicBlock*, llvm::BasicBlock*, unsigned long, clang::Stmt::Likelihood, clang::Expr const*, clang::VarDecl const*) (/usr/lib/libprivateclang.so.21+0x222033f) #22 0x0000266869fc9c1a (/usr/lib/libprivateclang.so.21+0x21c9c1a) #23 0x0000266869fc7771 clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(clang::OMPLoopDirective const&, clang::Expr*, llvm::function_ref<std::__1::pair<clang::CodeGen::LValue, clang::CodeGen::LValue> (clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&)> const&, llvm::function_ref<std::__1::pair<llvm::Value*, llvm::Value*> (clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&, clang::CodeGen::Address, clang::CodeGen::Address)> const&) (/usr/lib/libprivateclang.so.21+0x21c7771) #24 0x0000266869fe3e97 (/usr/lib/libprivateclang.so.21+0x21e3e97) #25 0x0000266869f21ee8 clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&) const (/usr/lib/libprivateclang.so.21+0x2121ee8) #26 0x0000266869f5a00e (/usr/lib/libprivateclang.so.21+0x215a00e) #27 0x0000266869fb3280 clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt const&, clang::SourceLocation) (/usr/lib/libprivateclang.so.21+0x21b3280) #28 0x0000266869f27c44 (/usr/lib/libprivateclang.so.21+0x2127c44) #29 0x0000266869f279f8 clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&, clang::VarDecl const*, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&) (/usr/lib/libprivateclang.so.21+0x21279f8) #30 0x0000266869fbdd7a (/usr/lib/libprivateclang.so.21+0x21bdd7a) #31 0x0000266869fcc8d5 clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(clang::OMPParallelForDirective const&) (/usr/lib/libprivateclang.so.21+0x21cc8d5) #32 0x0000266869f9f649 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/usr/lib/libprivateclang.so.21+0x219f649) #33 0x0000266869f9fde1 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/usr/lib/libprivateclang.so.21+0x219fde1) #34 0x0000266869f9f31d clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/usr/lib/libprivateclang.so.21+0x219f31d) #35 0x0000266869fa2457 clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&, llvm::ArrayRef<clang::Attr const*>) (/usr/lib/libprivateclang.so.21+0x21a2457) #36 0x0000266869f9f810 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/usr/lib/libprivateclang.so.21+0x219f810) #37 0x0000266869fab36c clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/usr/lib/libprivateclang.so.21+0x21ab36c) #38 0x000026686a01ec05 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/lib/libprivateclang.so.21+0x221ec05) #39 0x000026686a046c1c clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/libprivateclang.so.21+0x2246c1c) #40 0x000026686a03f3d8 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/libprivateclang.so.21+0x223f3d8) #41 0x000026686a031816 clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/libprivateclang.so.21+0x2231816) #42 0x000026686a02e55b clang::CodeGen::CodeGenModule::Release() (/usr/lib/libprivateclang.so.21+0x222e55b) #43 0x000026686a1006ee (/usr/lib/libprivateclang.so.21+0x23006ee) #44 0x000026686a00bd95 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/lib/libprivateclang.so.21+0x220bd95) #45 0x000026686a7b2b09 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libprivateclang.so.21+0x29b2b09) #46 0x000026686a61dfa8 clang::FrontendAction::Execute() (/usr/lib/libprivateclang.so.21+0x281dfa8) #47 0x000026686a59ea2d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libprivateclang.so.21+0x279ea2d) #48 0x000026686a6be405 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libprivateclang.so.21+0x28be405) #49 0x0000266046350194 (/usr/bin/c+++0xe194) #50 0x000026604635e015 (/usr/bin/c+++0x1c015) #51 0x000026686a25faee (/usr/lib/libprivateclang.so.21+0x245faee) #52 0x0000266871b218bc llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/libprivatellvm.so.21+0x43218bc) #53 0x000026686a25f06a clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const (/usr/lib/libprivateclang.so.21+0x245f06a) #54 0x000026686a21e9a4 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/libprivateclang.so.21+0x241e9a4) #55 0x000026686a21ec2c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/libprivateclang.so.21+0x241ec2c) -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-295597-227>
