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

Issue 1338553003: Fix float to int conversion in base/numerics (Closed)

Created:
5 years, 3 months ago by jschuh
Modified:
5 years, 3 months ago
Reviewers:
Tom Sepez, brucedawson
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix float to int conversion in base/numerics This addresses the bug where range checks are incorrect when converting from a floating point value to an integral value of higher precision but lower width. It also reverts a previous attempted fix that eliminated false negatives but introduced false positives. BUG=522989 Committed: https://crrev.com/fafe071bac241504791c2904af9fbfea476274c8 Cr-Commit-Position: refs/heads/master@{#348706}

Patch Set 1 #

Patch Set 2 : removed spurious change #

Total comments: 6

Patch Set 3 : comment nits #

Total comments: 2

Patch Set 4 : more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -8 lines) Patch
M base/numerics/safe_conversions_impl.h View 1 2 3 5 chunks +54 lines, -8 lines 0 comments Download
M base/numerics/safe_numerics_unittest.cc View 1 2 3 5 chunks +119 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (9 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338553003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338553003/1
5 years, 3 months ago (2015-09-11 20:10:23 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338553003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338553003/20001
5 years, 3 months ago (2015-09-11 20:28:47 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/102117)
5 years, 3 months ago (2015-09-11 21:42:05 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338553003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338553003/40001
5 years, 3 months ago (2015-09-11 22:20:28 UTC) #10
jschuh
Should be ready to go, but we'll see what the CQ dry run looks like ...
5 years, 3 months ago (2015-09-11 22:23:01 UTC) #11
jschuh
Ugh, I hit the back button so it cleared the CC fields, so I'm resending. ...
5 years, 3 months ago (2015-09-11 22:32:51 UTC) #13
brucedawson
I'm happy to be pulled in on FPU stuff. I haven't dealt with this issue ...
5 years, 3 months ago (2015-09-11 23:23:27 UTC) #14
jschuh
Bruce, are comfortable signing of? Because I'm an owner (since I wrote this mess in ...
5 years, 3 months ago (2015-09-12 00:43:12 UTC) #15
brucedawson
Let me poke at it a bit more. Best to get it perfect the first ...
5 years, 3 months ago (2015-09-12 00:45:55 UTC) #16
Peter Kasting
Did you guys look at the implementation of clampTo() in src/third_party/WebKit/Source/wtf/MathExtras.h? It seems like it's ...
5 years, 3 months ago (2015-09-12 00:51:22 UTC) #17
brucedawson
The clamping looks correct (as long as we never run on a ones-complement or signed-magnitude ...
5 years, 3 months ago (2015-09-12 01:28:43 UTC) #18
jschuh
On 2015/09/12 00:51:22, Peter Kasting wrote: > Did you guys look at the implementation of ...
5 years, 3 months ago (2015-09-12 01:59:37 UTC) #19
jschuh
On 2015/09/12 01:28:43, brucedawson wrote: > The clamping looks correct (as long as we never ...
5 years, 3 months ago (2015-09-12 02:24:17 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338553003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338553003/100001
5 years, 3 months ago (2015-09-14 18:04:32 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:100001)
5 years, 3 months ago (2015-09-14 20:21:30 UTC) #24
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/fafe071bac241504791c2904af9fbfea476274c8 Cr-Commit-Position: refs/heads/master@{#348706}
5 years, 3 months ago (2015-09-14 20:22:08 UTC) #25
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:36:44 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/fafe071bac241504791c2904af9fbfea476274c8
Cr-Commit-Position: refs/heads/master@{#348706}

Powered by Google App Engine
This is Rietveld 408576698