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

Issue 1266103005: cc: Handle overflow/underflow in MathUtil::RoundUp/RoundDown functions. (Closed)

Created:
5 years, 4 months ago by prashant.n
Modified:
5 years, 4 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Handle overflow/underflow in MathUtil::RoundUp/RoundDown functions. The existing functions are renamed as given below. RoundUp -> UncheckedRoundUp RoundDown -> UncheckedRoundDown These functions add the DCHECKs for verifying overflow/underflow by using VerifyOverflow and VerifyUnderflow functions. The checked versions CheckedRoundUp and CheckedRoundDown are added to implicitly check the overflow and underflow conditions. These versions CRASH if rounded up/down values overflow/underflow. P.N. All the rounding functions in current codebase have been replaced by unchecked versions. Following new unittests are added. MathUtilTest.RoundUpOverFlow MathUtilTest.RoundDownUnderFlow BUG=515566 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/239014d69890b6441de528a08340eda25747ecf2 Cr-Commit-Position: refs/heads/master@{#342049}

Patch Set 1 #

Patch Set 2 : Fixed signed/unsigned mismatch error. #

Total comments: 3

Patch Set 3 : Review comments. #

Patch Set 4 : Small nit. #

Patch Set 5 : Small nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -55 lines) Patch
M cc/base/math_util.h View 1 2 3 4 2 chunks +54 lines, -7 lines 0 comments Download
M cc/base/math_util_unittest.cc View 1 4 chunks +18 lines, -5 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M cc/playback/pixel_ref_map.cc View 2 chunks +13 lines, -11 lines 0 comments Download
M cc/raster/one_copy_tile_task_worker_pool.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/resource_util.h View 7 chunks +7 lines, -27 lines 0 comments Download
M cc/resources/video_resource_updater.cc View 1 chunk +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 23 (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/1266103005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1266103005/1
5 years, 4 months ago (2015-08-03 13:29:31 UTC) #2
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
5 years, 4 months ago (2015-08-03 13:29:33 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1266103005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1266103005/1
5 years, 4 months ago (2015-08-03 13:32:11 UTC) #6
prashant.n
PTAL
5 years, 4 months ago (2015-08-03 13:47:05 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/85481)
5 years, 4 months ago (2015-08-03 14:35:44 UTC) #10
prashant.n
Please review this.
5 years, 4 months ago (2015-08-04 18:11:12 UTC) #11
vmpstr
https://codereview.chromium.org/1266103005/diff/20001/cc/base/math_util.h File cc/base/math_util.h (right): https://codereview.chromium.org/1266103005/diff/20001/cc/base/math_util.h#newcode102 cc/base/math_util.h:102: return mul "a ? b : false" is better ...
5 years, 4 months ago (2015-08-04 18:17:23 UTC) #13
prashant.n
PTAL
5 years, 4 months ago (2015-08-05 13:57:16 UTC) #14
vmpstr
lgtm
5 years, 4 months ago (2015-08-05 17:50:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1266103005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1266103005/80001
5 years, 4 months ago (2015-08-05 18:04:06 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/89076)
5 years, 4 months ago (2015-08-05 19:03:14 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1266103005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1266103005/80001
5 years, 4 months ago (2015-08-06 01:27:00 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 4 months ago (2015-08-06 02:23:07 UTC) #22
commit-bot: I haz the power
5 years, 4 months ago (2015-08-06 02:23:50 UTC) #23
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/239014d69890b6441de528a08340eda25747ecf2
Cr-Commit-Position: refs/heads/master@{#342049}

Powered by Google App Engine
This is Rietveld 408576698