Skip to content

Commit

Permalink
ios: Use correct address when storing register memory.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Justin Cohen authored and Crashpad LUCI CQ committed May 9, 2024
1 parent 8e60a93 commit 3710831
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/ios_handler/in_process_intermediate_dump_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void MaybeCaptureMemoryAround(IOSIntermediateDumpWriter* writer,

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

0 comments on commit 3710831

Please sign in to comment.