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

Issue 7206019: Fix "illegal access" when calling parseInt with a radix that is not a smi. (Closed)

Created:
9 years, 6 months ago by Steven
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix "illegal access" when calling parseInt with a radix that is not a smi. BUG=v8:1246 TEST=regress-1246.js Committed: http://code.google.com/p/v8/source/detail?r=8444

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rewrote tests and addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -2 lines) Patch
M src/v8natives.js View 1 1 chunk +3 lines, -2 lines 0 comments Download
A test/mjsunit/regress/regress-1246.js View 1 1 chunk +75 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
keuchel
PTAL
9 years, 6 months ago (2011-06-20 08:33:28 UTC) #1
Steven
This is already open for some time. Can someone PTAL?
9 years, 6 months ago (2011-06-27 11:39:04 UTC) #2
Lasse Reichstein
LGTM with comments. http://codereview.chromium.org/7206019/diff/1/src/v8natives.js File src/v8natives.js (right): http://codereview.chromium.org/7206019/diff/1/src/v8natives.js#newcode109 src/v8natives.js:109: radix = radix || 0; This ...
9 years, 5 months ago (2011-06-28 08:32:21 UTC) #3
Steven
PTAL again. http://codereview.chromium.org/7206019/diff/1/src/v8natives.js File src/v8natives.js (right): http://codereview.chromium.org/7206019/diff/1/src/v8natives.js#newcode109 src/v8natives.js:109: radix = radix || 0; It seems ...
9 years, 5 months ago (2011-06-28 10:10:35 UTC) #4
Lasse Reichstein
LGTM http://codereview.chromium.org/7206019/diff/1/src/v8natives.js File src/v8natives.js (right): http://codereview.chromium.org/7206019/diff/1/src/v8natives.js#newcode109 src/v8natives.js:109: radix = radix || 0; Ack, my bad. ...
9 years, 5 months ago (2011-06-28 10:28:17 UTC) #5
Lasse Reichstein
9 years, 5 months ago (2011-06-28 10:31:48 UTC) #6
http://codereview.chromium.org/7206019/diff/1/src/v8natives.js
File src/v8natives.js (right):

http://codereview.chromium.org/7206019/diff/1/src/v8natives.js#newcode109
src/v8natives.js:109: radix = radix || 0;
and because  radix = radix || 0  would not convert a HeapNumber containing 10 to
a smi.

If possible, add a test where the number is a heap-number value equal to 10 (but
it's hard to guarantee the underlying representation, try something like
Math.ln(Math.exp(10)) and cross your fingers).

Powered by Google App Engine
This is Rietveld 408576698