[Lldb-commits] [lldb] [lldb] Don't crash if no default unwind plan (PR #152481)
Nikita Popov via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 7 04:13:18 PDT 2025
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/152481
The code was assuming that if abi_sp is not null, then it will also return a non-null default unwind plan. However, this is not the case at least on s390x, so check for that. In that case, we'll treat it as an invalid frame.
>From d638c5ac3db3adb773d006ead6749c0fae5ec3e0 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Thu, 7 Aug 2025 13:05:23 +0200
Subject: [PATCH] [lldb] Don't crash if no default unwind plan
The code was assuming that if abi_sp is not null, then it will
also return a non-null default unwind plan. However, this is not
the case at least on s390x, so check for that. In that case,
we'll treat it as an invalid frame.
---
lldb/source/Target/RegisterContextUnwind.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lldb/source/Target/RegisterContextUnwind.cpp b/lldb/source/Target/RegisterContextUnwind.cpp
index 9e9e2d86958f3..bdd8578b14dba 100644
--- a/lldb/source/Target/RegisterContextUnwind.cpp
+++ b/lldb/source/Target/RegisterContextUnwind.cpp
@@ -426,9 +426,12 @@ void RegisterContextUnwind::InitializeNonZerothFrame() {
}
}
- if (abi_sp) {
- m_fast_unwind_plan_sp.reset();
+ m_fast_unwind_plan_sp.reset();
+ m_full_unwind_plan_sp.reset();
+ if (abi_sp)
m_full_unwind_plan_sp = abi_sp->CreateDefaultUnwindPlan();
+
+ if (m_full_unwind_plan_sp) {
if (m_frame_type != eSkipFrame) // don't override eSkipFrame
{
m_frame_type = eNormalFrame;
More information about the lldb-commits
mailing list