[Lldb-commits] [lldb] [lldb][NativePDB] Don't loop forever on a procedure without an address (PR #238171)

via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 2 16:59:08 PST 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

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


---
Full diff: https://github.com/llvm/llvm-project/pull/238171.diff


1 Files Affected:

- (modified) lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (+3-1) 


``````````diff
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 553a37618a52e..757609b706bce 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};

``````````

</details>


https://github.com/llvm/llvm-project/pull/238171


More information about the lldb-commits mailing list