[Lldb-commits] [lldb] [LLDB][Save Core Options] Custom ranges should follow the same safety checks as everyone else (PR #125323)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 31 17:41:03 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jacob Lalonde (Jlalond)

<details>
<summary>Changes</summary>

I encountered a `qMemoryRegionInfo not supported` error when capturing a Minidump. This was surprising, and I started looking around I found @<!-- -->jasonmolenda's fix in #<!-- -->115963 and then realized I was not validated anything from the custom ranges.

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


1 Files Affected:

- (modified) lldb/source/Target/Process.cpp (+2-5) 


``````````diff
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 89731f798deda8..428f8519b72fd5 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -6677,11 +6677,8 @@ static void GetUserSpecifiedCoreFileSaveRanges(Process &process,
 
   for (const auto &range : regions) {
     auto entry = option_ranges.FindEntryThatContains(range.GetRange());
-    if (entry) {
-      ranges.Append(range.GetRange().GetRangeBase(),
-                    range.GetRange().GetByteSize(),
-                    CreateCoreFileMemoryRange(range));
-    }
+    if (entry)
+      AddRegion(range, true, ranges);
   }
 }
 

``````````

</details>


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


More information about the lldb-commits mailing list