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

Issue 21392: Change compiler to safely write unsafe smis when they are spilled from... (Closed)

Created:
11 years, 10 months ago by William Hesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Change compiler to safely write unsafe smis when they are spilled from the frame, not when they are pushed onto frame. Also fixes unrelated flaw in virtual-frame.cc. Committed: http://code.google.com/p/v8/source/detail?r=1294

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Total comments: 9

Patch Set 3 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -18 lines) Patch
M src/codegen-ia32.h View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M src/codegen-ia32.cc View 1 2 2 chunks +21 lines, -10 lines 2 comments Download
M src/register-allocator-ia32.cc View 1 2 2 chunks +10 lines, -2 lines 0 comments Download
M src/virtual-frame-ia32.cc View 1 2 4 chunks +29 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
William Hesse
11 years, 10 months ago (2009-02-16 13:30:13 UTC) #1
Kevin Millikin (Chromium)
There doesn't seem to be any security problem with constant folding of arbitrary smis, or ...
11 years, 10 months ago (2009-02-16 14:03:34 UTC) #2
William Hesse
http://codereview.chromium.org/21392/diff/1/6 File src/codegen-ia32.cc (right): http://codereview.chromium.org/21392/diff/1/6#newcode1256 Line 1256: // Consider large constant smis to be non-smis, ...
11 years, 10 months ago (2009-02-16 16:01:01 UTC) #3
Kevin Millikin (Chromium)
LGTM if it passes all the tests.
11 years, 10 months ago (2009-02-16 16:09:06 UTC) #4
iposva
Please at least separate the unsafe smi spilling, loading from virtual frame from the "additions ...
11 years, 10 months ago (2009-02-17 06:36:37 UTC) #5
William Hesse
I have separated out all the unrelated changes, and all this change list now does ...
11 years, 10 months ago (2009-02-17 15:54:27 UTC) #6
iposva
Otherwise LGTM -Ivan http://codereview.chromium.org/21392/diff/1008/1012 File src/codegen-ia32.cc (right): http://codereview.chromium.org/21392/diff/1008/1012#newcode1326 Line 1326: } This apparently survived your ...
11 years, 10 months ago (2009-02-17 17:27:06 UTC) #7
William Hesse
11 years, 10 months ago (2009-02-18 09:04:56 UTC) #8
http://codereview.chromium.org/21392/diff/1008/1012
File src/codegen-ia32.cc (right):

http://codereview.chromium.org/21392/diff/1008/1012#newcode1326
Line 1326: }
On 2009/02/17 17:27:06, iposva wrote:
> This apparently survived your purge of unrelated single 4-byte user controlled
> sequences.

This is not an unrelated change.  It is one of the few places where a constant
result is used as an immediate operand.  All these places should be guarded with
an unsafe smi check, and load unsafe smis with ToRegister or LoadUnsafeSmi. 
When other operations implement constant folding by treating constant results as
a special case, they will also need to use this guard.  Right now, binary
operations (and some comparisons) catch constants earlier, by spotting the
literal AST node type.  That code is being changed to recognize constant results
instead, like this does.

Powered by Google App Engine
This is Rietveld 408576698