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

Issue 42600: Added more checks to SafeStackFrameIterator to prevent crashes when profiling. (Closed)

Created:
11 years, 9 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
Reviewers:
Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Added more checks to SafeStackFrameIterator to prevent crashes when profiling. Tested by profiling 3d-morph.js a 100 times both in debug and release builds. Committed: http://code.google.com/p/v8/source/detail?r=1611

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fixed Kasper's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M src/frames.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
11 years, 9 months ago (2009-03-25 11:03:15 UTC) #1
Kasper Lund
LGTM. http://codereview.chromium.org/42600/diff/1/2 File src/frames.cc (right): http://codereview.chromium.org/42600/diff/1/2#newcode234 Line 234: // see EntryFrame::GetCallerState Capitalize see (see -> ...
11 years, 9 months ago (2009-03-25 11:17:13 UTC) #2
Mikhail Naganov
11 years, 9 months ago (2009-03-25 12:58:35 UTC) #3
http://codereview.chromium.org/42600/diff/1/2
File src/frames.cc (right):

http://codereview.chromium.org/42600/diff/1/2#newcode234
Line 234: // see EntryFrame::GetCallerState
On 2009/03/25 11:17:13, Kasper Lund wrote:
> Capitalize see (see -> See) and terminate comment with . Maybe consider
> explicitly describing that this is customized versions of GetCallerState for
> entry frames and GetCallerStackPointer for argument adaptor frames and explain
> why it it breaks without these guards.

Done.

http://codereview.chromium.org/42600/diff/1/2#newcode235
Line 235: if (!IsValidStackAddress(
On 2009/03/25 11:17:13, Kasper Lund wrote:
> Compute the stack address (caller_fp?) in a local variable before the
> IsValidStackAddress check. 

Done.

http://codereview.chromium.org/42600/diff/1/2#newcode241
Line 241: // see ArgumentsAdaptorFrame::GetCallerStackPointer
On 2009/03/25 11:17:13, Kasper Lund wrote:
> I think this comment should be improved like above. It's not super clear why
you
> need this.

Done.

http://codereview.chromium.org/42600/diff/1/2#newcode242
Line 242: if (!reinterpret_cast<ArgumentsAdaptorFrame*>(frame)->
On 2009/03/25 11:17:13, Kasper Lund wrote:
> I would break this by introducing a local variable for the adaptor_frame
(after
> the cast) to make it easier to read. Maybe also document what GetExpression(0)
> is by introducing a local variable (with a name like number_of_arguments) for
> that?

Done.

Powered by Google App Engine
This is Rietveld 408576698