mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-28 15:50:26 +08:00
56399b2553
nullptr ProcessReader::Module. Prior to 64b87325b9de, the alignment problem meant that the Module for dyld was looking at the wrong address instead of dyld’s correct load address when a 32-bit process attempted to examine a crashing 64-bit process. This resulted in a crash during the MachOImageAnnotationsReader.CrashDyld test. ProcessReader::Module pointers are permitted to be nullptr. This allows minimal module data (its name) to be preserved even when no sense can be made of the module based on its load address. The producer, ProcessReader::InitializeModules(), and the non-test consumer, ModuleSnapshotMac::Initialize(), both accept this correctly. The producer’s documentation is updated to call this out. The ProcessReader test is also updated to tolerate this case without crashing by adding assertions. TEST=snapshot_test MachOImageAnnotationsReader.*, ProcessReader.* R=rsesek@chromium.org Review URL: https://codereview.chromium.org/989713002