[Lldb-commits] [lldb] [lldb][NativePDB] Don't loop forever on a procedure without an address (PR #238171)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 2 16:58:31 PST 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/238171
When `ParseLineTable` walks the procedures of a compile unit to add the line entries of their inline sites, it skipped a procedure whose segment and offset don't map to a virtual address with `continue`, without advancing the iterator, so the loop read the same `S_GPROC32` again forever.
This patch skips to the end of the procedure's scope, as the loop does for every other procedure.
rdar://191640721
>From 1ca8acaf3046cfd4efcd9052b6cfe02e0b8bde47 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Mon, 28 Sep 2026 12:48:39 +0100
Subject: [PATCH] [lldb][NativePDB] Don't loop forever on a procedure without
an address
---
.../Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 553a37618a52ed..757609b706bcee 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1662,8 +1662,10 @@ bool SymbolFileNativePDB::ParseLineTable(CompileUnit &comp_unit) {
SegmentOffsetLength sol = GetSegmentOffsetAndLength(func_record);
addr_t file_vm_addr =
m_index->MakeVirtualAddress(sol.so.segment, sol.so.offset);
- if (file_vm_addr == LLDB_INVALID_ADDRESS)
+ if (file_vm_addr == LLDB_INVALID_ADDRESS) {
+ iter = syms.at(getScopeEndOffset(func_record));
continue;
+ }
Address func_base(file_vm_addr, comp_unit.GetModule()->GetSectionList());
PdbCompilandSymId func_id{modi, record_offset};
More information about the lldb-commits
mailing list