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

Issue 2353453004: SkASSERT firing because pointer wraps negative. (Closed)

Created:
4 years, 3 months ago by cblume
Modified:
4 years, 3 months ago
Reviewers:
hal.canary, bsalomon, ericrk
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

SkASSERT firing because pointer wraps negative. Some pointers are being cast to intptr_t so they can be used with SkAlign8(). However, a large pointer value might become a negative integer since intptr_t is signed. When comparing these intptr_ts, we expect the larger pointer value to be greater. But it might be so large that it becomes negative, causing it to be less than. A SkASSERT is firing for this exact reason. BUG=648452 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353453004 Committed: https://skia.googlesource.com/skia/+/05a3eac35c58295caf5937da42c32da540b05cb0

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M src/image/SkImage_Gpu.cpp View 4 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
cblume
PTAL
4 years, 3 months ago (2016-09-19 23:28:35 UTC) #5
ericrk
It's unfortunate that the SkAlign macros won't just work with a char*, but given this ...
4 years, 3 months ago (2016-09-20 00:14:17 UTC) #6
ericrk
On 2016/09/20 00:14:17, ericrk wrote: > It's unfortunate that the SkAlign macros won't just work ...
4 years, 3 months ago (2016-09-20 00:16:10 UTC) #9
bsalomon
lgtm
4 years, 3 months ago (2016-09-20 02:59:59 UTC) #10
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/2353453004/1
4 years, 3 months ago (2016-09-20 04:04:25 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/05a3eac35c58295caf5937da42c32da540b05cb0
4 years, 3 months ago (2016-09-20 04:05:20 UTC) #14
hal.canary
Nit: Your commit message exactly describes the bug you are fixing. You don't actually say ...
4 years, 3 months ago (2016-09-20 17:41:43 UTC) #16
cblume
4 years, 3 months ago (2016-09-20 17:46:00 UTC) #17
Message was sent while issue was closed.
On 2016/09/20 17:41:43, Hal Canary wrote:
> Nit:
> Your commit message exactly describes the bug you are fixing. You don't
actually
> say that you make any changes or fix the bug.

Hrmmm you are right. I'll try to be better about that in the future.

Powered by Google App Engine
This is Rietveld 408576698