ios: Use correct address when storing register memory.

The memory region data saved in the intermediate dump is an address
offset by 128 bytes. However, the MemorySnapshot generated was using the
original address and not the offset address.  The same data is being
captured in the minidump.

Change-Id: Ia34912c035319e79cf446a130e662084f4ab51ea
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5529059
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
(cherry picked from commit 371083179b7b3bc68dc8ff03ac235717805c78bd)
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5632884
Reviewed-by: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
Justin Cohen 2024-05-09 10:10:43 -04:00 committed by Ben Hamilton
parent 6ce83d80f7
commit dc2d082b92

View File

@ -415,7 +415,7 @@ void MaybeCaptureMemoryAround(IOSIntermediateDumpWriter* writer,
IOSIntermediateDumpWriter::ScopedArrayMap memory_region(writer); IOSIntermediateDumpWriter::ScopedArrayMap memory_region(writer);
WriteProperty( WriteProperty(
writer, IntermediateDumpKey::kThreadContextMemoryRegionAddress, &address); writer, IntermediateDumpKey::kThreadContextMemoryRegionAddress, &target);
// Don't use WritePropertyBytes, this one will fail regularly if |target| // Don't use WritePropertyBytes, this one will fail regularly if |target|
// cannot be read. // cannot be read.
writer->AddPropertyBytes(IntermediateDumpKey::kThreadContextMemoryRegionData, writer->AddPropertyBytes(IntermediateDumpKey::kThreadContextMemoryRegionData,