mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
The 32-bit process_types definition of dyld_all_image_infos winds up with four extra bytes of tail padding when built into a 64-bit crashpad_handler compared to a 32-bit one, and compared to the structure’s native size. This prevents a 64-bit crashpad_handler from being able to create a module snapshot of a 32-bit process for dyld_all_image_infos versions 14 (since 10.9) and 15 (since 10.12). Work around this by placing a zero-length “end” marker and using offsetof(dyld_all_image_infos, end) in preference to sizeof(dyld_all_image_infos). BUG=crashpad:156,crashpad:148,crashpad:120 TEST=crashpad_snapshot_test ProcessTypes.DyldImagesSelf, run_with_crashpad --handler=crashpad_handler{,32} builtin_trap{,32} Change-Id: I406ad53851b5bd29ec802b7ad3073836ebe8c34c Reviewed-on: https://chromium-review.googlesource.com/437924 Reviewed-by: Robert Sesek <rsesek@chromium.org>