[Lldb-commits] [lldb] Revert "[LLDB] Reappply SBSaveCore AddMemoryList" (PR #107731)

Jacob Lalonde via lldb-commits lldb-commits at lists.llvm.org
Sat Sep 7 22:36:59 PDT 2024


Jlalond wrote:

> I'll look more closely later when I have time, but ObjectFileMachO::SaveCore called `Process::CalculateCoreFileSaveRanges` with an `options` of `eSaveCoreDirtyOnly` (so, `GetCoreFileSaveRangesDirtyOnly()`), it's returning gigantic memory regions to be saved to the corefile. I tried doing a "full" style coredump of the test binary (using an lldb with this patch applied) and it was around 4.6GB. Then I tried a `-s modified-memory` corefile and it had dumped 34GB before I killed the process. Running an lldb without this PR, a dirty-memory-only coredump of this process is 10MB.

Sorry about causing some problems on Saturday no less. My guess is this is from the finalize core save ranges, specifically how we roll up all the memory ranges. My first thinking out loud question is why this isn't happening on Linux Minidumps, but I know MacOS and Linux differ on what the kernel says if the page is dirty.

I'll look into it on Monday and appreciate the investigation assistance

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


More information about the lldb-commits mailing list