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

Issue 605002: More robust stack walks when EIP in the context frame is invalid (ot not in a known module). (Closed)

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

Description

More robust stack walks when the IP address in the context frame is invalid (or
not in a known module).

This is achieved by:
1. Extending the span of the scan for return address in the conext frame. 
Initially, I wanted to extend the span of the scan for all frames but then I
noticed that there is code for ARM already that is extending the search only for
the context frame.  This kind of makes sense so I decided to reuse the same idea
everywhere.
2. Attempting to restore the EBP chain after a successful scan for return
address so that the stackwalker can switch back to FRAME_TRUST_CFI for the rest
of the frames when possible.

I also fixed the lint errors in the files touched.
Committed: https://code.google.com/p/google-breakpad/source/detail?r=1193

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/google_breakpad/processor/stackwalker.h View 1 chunk +9 lines, -2 lines 0 comments Download
M src/processor/stackwalker_amd64.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/processor/stackwalker_arm.cc View 1 chunk +1 line, -7 lines 0 comments Download
M src/processor/stackwalker_x86.cc View 1 2 3 4 5 chunks +29 lines, -10 lines 0 comments Download
M src/processor/stackwalker_x86_unittest.cc View 1 2 20 chunks +307 lines, -82 lines 0 comments Download

Messages

Total messages: 5
Ivan Penkov
.
11 years, 2 months ago #1
Mark Mentovai
In the CL description, you wrote: > This kind of makes sense so I decided ...
11 years, 2 months ago #2
Ivan Penkov
Regarding the larger scans in the context frame. We usually resort to scanning for a ...
11 years, 2 months ago #3
Mark Mentovai
LGTM otherwise. I’m still not really sold on the “treat context frame differently” aspect, but ...
11 years, 2 months ago #4
Ivan Penkov
11 years, 2 months ago #5
Done.

https://breakpad.appspot.com/605002/diff/9001/src/processor/stackwalker_x86.cc
File src/processor/stackwalker_x86.cc (right):

https://breakpad.appspot.com/605002/diff/9001/src/processor/stackwalker_x86.c...
src/processor/stackwalker_x86.cc:58: static const uint32_t
kMaxReasonableGapBetweenFrames = 128 << 10;  // 128 KB
On 2013/06/24 21:44:03, Mark Mentovai wrote:
> Write 128 * 1024. Some people might recognize << 10 as * 1024, but not
everyone
> will. I’m one of the people who recognize << 10 for what it is, and I still
> think it’s clearer to communicate intent (“kilo = 1024”) than to be cute. If a
> left shift is the best way to implement multiplication by a power of two, the
> compiler will generally emit a left shift, but since this is a static const,
> there shouldn’t even be any machine code doing the multiplication at all.

Done.
Sign in to reply to this message.

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