From dc2d082b92dc06d74a8b041b0a5f6d1811755e5c Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Thu, 9 May 2024 10:10:43 -0400 Subject: [PATCH] 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 Reviewed-by: Joshua Peraza Reviewed-by: Rohit Rao (cherry picked from commit 371083179b7b3bc68dc8ff03ac235717805c78bd) Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5632884 Reviewed-by: Justin Cohen --- client/ios_handler/in_process_intermediate_dump_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ios_handler/in_process_intermediate_dump_handler.cc b/client/ios_handler/in_process_intermediate_dump_handler.cc index 29e26cb8..5e6c42df 100644 --- a/client/ios_handler/in_process_intermediate_dump_handler.cc +++ b/client/ios_handler/in_process_intermediate_dump_handler.cc @@ -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,