[Lldb-commits] [lldb] [LLDB][Minidump] Fix bug in generating 64b memory minidumps (PR #141995)
Jacob Lalonde via lldb-commits
lldb-commits at lists.llvm.org
Thu May 29 10:35:46 PDT 2025
https://github.com/Jlalond created https://github.com/llvm/llvm-project/pull/141995
In #129307, we introduced read write in chunks, and during the final revision of the PR I changed the behavior for 64b memory regions and did not test an actual 64b memory range.
This caused LLDB to crash whenever we generated a 64b memory region.
64b regions has been a problem in testing for some time as it's a waste of test resources to generation a 5gb+ Minidump. I will work with @clayborg and @labath to come up with a way to specify creating a 64b list instead of a 32b list (likely via the yamilizer).
>From 929c63c892889ab33520020f1fc74e7f91388d41 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde <jalalonde at fb.com>
Date: Thu, 29 May 2025 10:32:16 -0700
Subject: [PATCH] Fix bug where we update the index before accessing the
descriptor for 64b memory ranges on Minidumps
---
.../source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
index 2818d31eb2301..806f256d9da48 100644
--- a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
+++ b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
@@ -1170,7 +1170,6 @@ MinidumpFileBuilder::AddMemoryList_64(std::vector<CoreFileMemoryRange> &ranges,
"(%" PRIx64 "bytes) "
"[%" PRIx64 ", %" PRIx64 ")",
region_index, ranges.size(), size, addr, addr + size);
- ++region_index;
progress.Increment(1, "Adding Memory Range " + core_range.Dump());
uint64_t bytes_read = 0;
@@ -1186,6 +1185,8 @@ MinidumpFileBuilder::AddMemoryList_64(std::vector<CoreFileMemoryRange> &ranges,
cleanup_required = true;
descriptors[region_index].DataSize = bytes_read;
}
+
+ ++region_index;
}
// Early return if there is no cleanup needed.
More information about the lldb-commits
mailing list