[all-commits] [llvm/llvm-project] bb7c7d: [lldb][minidump] Fix Memory64List DataSize over-co...

satyanarayana reddy janga via All-commits all-commits at lists.llvm.org
Thu Jul 30 12:23:23 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb7c7d1e2a6b4a3487df8604f94e0b981e873899
      https://github.com/llvm/llvm-project/commit/bb7c7d1e2a6b4a3487df8604f94e0b981e873899
  Author: satyanarayana reddy janga <satyajanga at gmail.com>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
    A lldb/test/API/functionalities/process_save_core_minidump/size_mismatch/Makefile
    A lldb/test/API/functionalities/process_save_core_minidump/size_mismatch/TestProcessSaveCoreMinidumpSizeMismatch.py
    A lldb/test/API/functionalities/process_save_core_minidump/size_mismatch/main.cpp

  Log Message:
  -----------
  [lldb][minidump] Fix Memory64List DataSize over-counting on a failed read (#212861)

**Issue:**
save-core records each range's DataSize from the value
ReadMemoryInChunks returns. That value counts bytes read from the
inferior even when the callback dropped them: a chunk that errors
part-way returns Stop before AddData, so the partially-read bytes are
counted but never written.

Because the Memory64List locates every range by the cumulative DataSize
of the preceding ranges, an over-counted DataSize desyncs the shared
data blob: the descriptors claim more bytes than the file holds and
every later range reads back corrupted.

**Fix**
Record the bytes actually written (total_bytes_read) as the range's size
so the descriptor DataSize matches the data in the blob.

**Test**
Add an API test that custom-saves a fully-readable region alongside a
region whose tail is unreadable (a file mapped larger than the file),
and checks the Memory64List does not claim more data than the file holds
and that the readable region round-trips byte-for-byte.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list