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 <npo...@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; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits