Descriptionsnapshot/mac: MachOImageAnnotationsReader test shouldn’t crash with a
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
Committed: https://chromium.googlesource.com/crashpad/crashpad/+/56399b255331e9f1a95a13c0fcfb733451fda7a7
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|