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

Issue 2548243004: Return false in TryNumberToSize if there is a cast error (Closed)

Created:
4 years ago by qiuyi.zqy
Modified:
4 years ago
Reviewers:
ahaas
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Return false in TryNumberToSize if the number is 1 << 64. Currently when the number passed to TryNumberToSize is 1 << 64, it gets away with a bug caused by rounding of mantissa. Then the number will be casted to 0 and TryNumberToSize will return true. This patch fix this by making the range check more accurate. BUG=v8:5712 Committed: https://crrev.com/9ca022fab2e7310cc96ff405baf426f6ed27a703 Cr-Commit-Position: refs/heads/master@{#41578}

Patch Set 1 #

Patch Set 2 : Return false in TryNumberToSize if there is a cast error #

Patch Set 3 : Return false in TryNumberToSize if there is a cast error #

Patch Set 4 : Return false in TryNumberToSize if there is a cast error #

Patch Set 5 : Return false in TryNumberToSize if there is a cast error #

Total comments: 6

Patch Set 6 : y #

Patch Set 7 : Return false in TryNumberToSize if the number is 1 << 64. #

Patch Set 8 : Return false in TryNumberToSize if the number is 1 << 64. #

Patch Set 9 : Return false in TryNumberToSize if the number is 1 << 64. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -1 line) Patch
M AUTHORS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/conversions-inl.h View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M test/cctest/test-conversions.cc View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (21 generated)
qiuyi.zqy
Hi, the bug is discovered in https://github.com/nodejs/node/pull/9924 and I tried to come up with a ...
4 years ago (2016-12-07 02:32:47 UTC) #8
ahaas
Thanks for taking care of this issue. https://codereview.chromium.org/2548243004/diff/80001/src/conversions-inl.h File src/conversions-inl.h (right): https://codereview.chromium.org/2548243004/diff/80001/src/conversions-inl.h#newcode157 src/conversions-inl.h:157: if (value ...
4 years ago (2016-12-07 16:20:38 UTC) #10
qiuyi.zqy
Thank you for the review, they have been addressed. https://codereview.chromium.org/2548243004/diff/80001/src/conversions-inl.h File src/conversions-inl.h (right): https://codereview.chromium.org/2548243004/diff/80001/src/conversions-inl.h#newcode157 src/conversions-inl.h:157: ...
4 years ago (2016-12-07 18:13:36 UTC) #13
qiuyi.zqy
The CLA check should be cleared now, I have asked our legal staff to add ...
4 years ago (2016-12-08 07:32:11 UTC) #18
ahaas
lgtm
4 years ago (2016-12-08 08:47:13 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2548243004/160001
4 years ago (2016-12-08 09:18:15 UTC) #25
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-12-08 09:19:56 UTC) #27
commit-bot: I haz the power
4 years ago (2016-12-08 09:20:34 UTC) #29
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/9ca022fab2e7310cc96ff405baf426f6ed27a703
Cr-Commit-Position: refs/heads/master@{#41578}

Powered by Google App Engine
This is Rietveld 408576698