[llvm-branch-commits] [lldb] release/22.x: [lldb] Fix crash when there is no compile unit. (#177278) (PR #177351)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 22 04:37:45 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: None (llvmbot)
<details>
<summary>Changes</summary>
Backport 088f88d6fd4047c52266b92eba5ca60782a69ba1
Requested by: @<!-- -->da-viper
---
Full diff: https://github.com/llvm/llvm-project/pull/177351.diff
1 Files Affected:
- (modified) lldb/source/ValueObject/DILEval.cpp (+3)
``````````diff
diff --git a/lldb/source/ValueObject/DILEval.cpp b/lldb/source/ValueObject/DILEval.cpp
index f4b7f783d7b71..b437657d4ade3 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -50,6 +50,9 @@ GetTypeSystemFromCU(std::shared_ptr<ExecutionContextScope> ctx) {
return llvm::createStringError("no stack frame in this context");
SymbolContext symbol_context =
stack_frame->GetSymbolContext(lldb::eSymbolContextCompUnit);
+
+ if (!symbol_context.comp_unit)
+ return llvm::createStringError("no compile unit in this context");
lldb::LanguageType language = symbol_context.comp_unit->GetLanguage();
symbol_context = stack_frame->GetSymbolContext(lldb::eSymbolContextModule);
``````````
</details>
https://github.com/llvm/llvm-project/pull/177351
More information about the llvm-branch-commits
mailing list