Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(384)

Issue 500002: Google-breakpad processor doesn't recognize and use context records generated by ::RtlCaptureContext (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 12 months ago by Ivan Penkov
Modified:
11 years, 11 months ago
CC:
google-breakpad-dev_googlegroups.com
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/
Visibility:
Public.

Description

The Google-breakpad processor rejects (ignores) context records that lack CPU
type information in their context_flags fields.  Such context records can be
valid (e.g. contexts captured by ::RtlCaptureContext).

The proposed fix is to load the CPU type information from the system info stream
(which all minidumps should have) when the CPU type information is missing from
the context record.  This will allow processing of context records produced by
::RtlCaptureContext.

Two unittest were added:
 - A test that covers the scenario where CPU flags are missing from
context_flags but the CPU type can be loaded from the system info stream:
Dump.OneExceptionX86NoCPUFlag.
 - A test that covers the scenario where CPU flags are missing from
context_flags and there is no system info stream in the dump:
Dump.OneExceptionX86NoCPUFlagNoSystemInfo.

A few places in the code where the lack of CPU type information in the
context_flags was considered to be invalid had to be updated (including a
unittest).

While at it, I also enabled warning -Wreorder to be treated as error in
Makefile.am and I fixed the single occurrence of this issue in the constructor
of MinidumpContext.  It was failing to compile in our Google project and it is a
nice and small (one line) fix.

This issue is already tracked here:
http://code.google.com/p/google-breakpad/issues/detail?id=493&can=1&q=excepti...

Currently, this issue affects about 25% of all Chrome crash reports on Windows -
as measured on a random sample consisting of 2 million crash reports.

Thanks,
-Ivan

Patch Set 1 #

Patch Set 2 : Updating some comments and formatting #

Patch Set 3 : Added a unittests that covers the scenario where the dump has no system info stream: Dump.OneExcept… #

Total comments: 8

Patch Set 4 : Replace 0 == with == 0 #

Patch Set 5 : Getting rid of the cookie stuff #

Total comments: 1

Patch Set 6 : Replace -1 == with == -1 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M Makefile.am View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M Makefile.in View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M src/google_breakpad/processor/minidump.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/processor/minidump.cc View 1 2 3 4 5 4 chunks +85 lines, -2 lines 0 comments Download
M src/processor/minidump_unittest.cc View 1 2 3 1 chunk +152 lines, -0 lines 0 comments Download
M src/processor/synth_minidump.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M src/processor/synth_minidump_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9
Ivan Penkov
.
11 years, 12 months ago #1
Jess
LGTM. cc-ing google breakpad dev group to bring everyone into the loop on the review. ...
11 years, 12 months ago #2
Ivan Penkov
. http://breakpad.appspot.com/500002/diff/5001/src/processor/minidump.cc File src/processor/minidump.cc (left): http://breakpad.appspot.com/500002/diff/5001/src/processor/minidump.cc#oldcode323 src/processor/minidump.cc:323: //TODO: fall through to switch below? On 2012/11/28 ...
11 years, 12 months ago #3
Mark Mentovai
http://breakpad.appspot.com/500002/diff/5001/src/processor/minidump.cc File src/processor/minidump.cc (right): http://breakpad.appspot.com/500002/diff/5001/src/processor/minidump.cc#newcode322 src/processor/minidump.cc:322: if (0 == cpu_type) { Unusual, write cpu_type == ...
11 years, 11 months ago #4
Ivan Penkov
I replaced 0 == with == 0. Mark, I think I should get rid of ...
11 years, 11 months ago #5
Mark Mentovai
Yup, I'd get rid of the cookie stuff. gcc and clang definitely detect accidental assignments ...
11 years, 11 months ago #6
Ivan Penkov
Done. The cookie stuff is now gone. Thanks, -Ivan
11 years, 11 months ago #7
Mark Mentovai
LGTM http://breakpad.appspot.com/500002/diff/17001/src/processor/minidump.cc File src/processor/minidump.cc (right): http://breakpad.appspot.com/500002/diff/17001/src/processor/minidump.cc#newcode3842 src/processor/minidump.cc:3842: if (-1 == saved_position) { Fix.
11 years, 11 months ago #8
Ivan Penkov
11 years, 11 months ago #9
On 2012/12/08 03:08:17, Mark Mentovai wrote:
> LGTM
> 
> http://breakpad.appspot.com/500002/diff/17001/src/processor/minidump.cc
> File src/processor/minidump.cc (right):
> 
>
http://breakpad.appspot.com/500002/diff/17001/src/processor/minidump.cc#newco...
> src/processor/minidump.cc:3842: if (-1 == saved_position) {
> Fix.

I missed that, sorry.  It is fixed now.

Thanks,
-Ivan
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted