[clang] Reland "[Modules] Record whether VarDecl initializers contain side effects" (PR #145447)
Henrik G. Olsson via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 4 10:17:51 PDT 2025
hnrklssn wrote:
> @hnrklssn we (at google) have bisected a clang crash at the original commit (https://github.com/llvm/llvm-project/commit/319a51a5ffb807b88ae7f73676894bf306a0d134) that also reproduces at this revision.
>
>
>
> Here's the stack trace:
>
>
>
> ```
>
> assert.h assertion failed at llvm-project/llvm/include/llvm/Support/Casting.h:566 in decltype(auto) llvm::cast(const From &) [To = clang::RecordType, >From = clang::QualType]: isa<To>(Val) && "cast<Ty>() argument of incompatible type!"
>
> *** Check failure stack trace: ***
>
> @ 0x55b57e120f04 absl::log_internal::LogMessage::SendToLog()
>
> @ 0x55b57e120ec7 absl::log_internal::LogMessage::Flush()
>
> @ 0x55b57e349204 __assert_fail
>
> @ 0x55b57a572ad0 CheckEvaluationResult()
>
> @ 0x55b57a5353a5 clang::Expr::EvaluateAsInitializer()
>
> @ 0x55b57a44eb32 clang::VarDecl::evaluateValueImpl()
>
> @ 0x55b57a44e07a clang::VarDecl::evaluateValue()
>
> @ 0x55b57a44df78 clang::VarDecl::hasInitWithSideEffects()
>
> @ 0x55b579595839 clang::ASTDeclWriter::VisitVarDecl()
>
> @ 0x55b57958e996 clang::ASTDeclWriter::Visit()
>
> @ 0x55b5795a18bc clang::ASTWriter::WriteDecl()
>
> @ 0x55b579551725 clang::ASTWriter::WriteDeclAndTypes()
>
> @ 0x55b57954b42b clang::ASTWriter::WriteASTCore()
>
> @ 0x55b57954a131 clang::ASTWriter::WriteAST()
>
> @ 0x55b5795bb1e0 clang::PCHGenerator::HandleTranslationUnit()
>
> @ 0x55b579127cfd clang::MultiplexConsumer::HandleTranslationUnit()
>
> @ 0x55b57933a948 clang::ParseAST()
>
> @ 0x55b57906e34a clang::FrontendAction::Execute()
>
> @ 0x55b578fe125d clang::CompilerInstance::ExecuteAction()
>
> @ 0x55b57842586b clang::ExecuteCompilerInvocation()
>
> @ 0x55b578419218 cc1_main()
>
> @ 0x55b578416334 ExecuteCC1Tool()
>
> @ 0x55b579197a3e llvm::function_ref<>::callback_fn<>()
>
> @ 0x55b57df95c9c llvm::CrashRecoveryContext::RunSafely()
>
> @ 0x55b579196f24 clang::driver::CC1Command::Execute()
>
> @ 0x55b579157615 clang::driver::Compilation::ExecuteCommand()
>
> @ 0x55b5791578af clang::driver::Compilation::ExecuteJobs()
>
> @ 0x55b579173200 clang::driver::Driver::ExecuteCompilation()
>
> @ 0x55b57841593d clang_main()
>
> @ 0x55b578413cf4 main
>
> @ 0x7fc1572933d4 __libc_start_main
>
> @ 0x55b578413c2a _start
>
> ```
>
>
>
> Can you please take a look?
Is it fixed by https://github.com/llvm/llvm-project/pull/146468?
https://github.com/llvm/llvm-project/pull/145447
More information about the cfe-commits
mailing list