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

Issue 732643002: Don't pass null to memcmp. (Closed)

Created:
6 years, 1 month ago by mtklein_C
Modified:
6 years, 1 month ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Don't pass null to memcmp. This will allow us to add nonnull-attribute to the UBSAN bot. We are in fact hitting a case where one of the arguments is null and the other not, which seems dicey. I think the scenario is comparing the empty pathref with another path ref that's just been COWed, without any verbs or points yet. BUG=skia: Committed: https://skia.googlesource.com/skia/+/d4897591fddf8f2a4860066449fb7dd8b0cc7b77

Patch Set 1 #

Patch Set 2 : allow either-or #

Patch Set 3 : check instead #

Patch Set 4 : loosen test when strlen == 0 #

Total comments: 2

Patch Set 5 : simplify check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -1 line) Patch
M src/core/SkPathRef.cpp View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M tests/PathTest.cpp View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 11 (4 generated)
mtklein
6 years, 1 month ago (2014-11-14 17:04:02 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/732643002/60001
6 years, 1 month ago (2014-11-14 17:04:58 UTC) #4
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 1 month ago (2014-11-14 17:04:59 UTC) #5
reed1
lgtm w/ question about possibly simplifying/clarifying the check. https://codereview.chromium.org/732643002/diff/60001/src/core/SkPathRef.cpp File src/core/SkPathRef.cpp (right): https://codereview.chromium.org/732643002/diff/60001/src/core/SkPathRef.cpp#newcode196 src/core/SkPathRef.cpp:196: if ...
6 years, 1 month ago (2014-11-14 17:09:41 UTC) #7
mtklein
https://codereview.chromium.org/732643002/diff/60001/src/core/SkPathRef.cpp File src/core/SkPathRef.cpp (right): https://codereview.chromium.org/732643002/diff/60001/src/core/SkPathRef.cpp#newcode196 src/core/SkPathRef.cpp:196: if (ref.fVerbCnt == 0 && ref.fPointCnt == 0) { ...
6 years, 1 month ago (2014-11-14 17:13:20 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/732643002/80001
6 years, 1 month ago (2014-11-14 17:14:39 UTC) #10
commit-bot: I haz the power
6 years, 1 month ago (2014-11-14 17:22:44 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/d4897591fddf8f2a4860066449fb7dd8b0cc7b77

Powered by Google App Engine
This is Rietveld 408576698