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

Issue 260523004: Avoid undefined behavior and enable asserts in ClampTest. (Closed)

Created:
6 years, 7 months ago by mtklein_C
Modified:
6 years, 7 months ago
Reviewers:
mtklein, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Avoid undefined behavior and enable asserts in ClampTest. The old code here wasn't being careful to avoid int32_t overflow in slow_check. Fix that. R_ASSERT hasn't been doing anything for a while. As a result, there are a couple bugs in SkClampRange, marked as such and commented out. The asserts also weren't quite passing, so I fixed them up (allowing 0xFFFF to be considered either as part of the ramp or part of V1.) BUG=skia:2481 Committed: http://code.google.com/p/skia/source/detail?r=14479

Patch Set 1 #

Patch Set 2 : names #

Patch Set 3 : remove ubsan #

Patch Set 4 : fix test, comment out bugs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -47 lines) Patch
M tests/ClampRangeTest.cpp View 1 2 3 4 chunks +34 lines, -47 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
mtklein
6 years, 7 months ago (2014-04-29 23:03:13 UTC) #1
mtklein
okay, ready for another look. what tests can pass are passing
6 years, 7 months ago (2014-04-30 15:47:25 UTC) #2
reed1
lgtm
6 years, 7 months ago (2014-04-30 16:32:11 UTC) #3
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 7 months ago (2014-04-30 16:32:32 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/260523004/60001
6 years, 7 months ago (2014-04-30 16:32:44 UTC) #5
commit-bot: I haz the power
6 years, 7 months ago (2014-04-30 16:51:53 UTC) #6
Message was sent while issue was closed.
Change committed as 14479

Powered by Google App Engine
This is Rietveld 408576698