Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 989713002: snapshot/mac: MachOImageAnnotationsReader test shouldn’t crash with a nullptr ProcessReader::Module (Closed)

Created:
5 years, 9 months ago by Mark Mentovai
Modified:
5 years, 9 months ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

snapshot/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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -7 lines) Patch
M snapshot/mac/mach_o_image_annotations_reader_test.cc View 1 chunk +11 lines, -7 lines 0 comments Download
M snapshot/mac/process_reader.h View 1 chunk +3 lines, -0 lines 0 comments Download
M snapshot/mac/process_reader_test.cc View 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Mark Mentovai
5 years, 9 months ago (2015-03-06 22:52:15 UTC) #2
Robert Sesek
LGTM
5 years, 9 months ago (2015-03-08 20:01:13 UTC) #3
Mark Mentovai
5 years, 9 months ago (2015-03-09 01:02:48 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
56399b255331e9f1a95a13c0fcfb733451fda7a7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698