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

Issue 957133002: Initialize three locals to avoid the risk of uninitialized reads. (Closed)

Created:
5 years, 9 months ago by brucedawson
Modified:
5 years, 9 months ago
Reviewers:
joshualitt, bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Initialize three locals to avoid the risk of uninitialized reads. /analyze recently reported two new warnings about reading from potentially uninitialized local variables: src\third_party\skia\src\gpu\grclipmaskmanager.cpp(290) : warning C6001: Using uninitialized memory 'requiresAA'. src\third_party\skia\src\gpu\grclipmaskmanager.cpp(336) : warning C6001: Using uninitialized memory 'genID'. It is not clear whether the uninitialized reads can actually happen, but the guarantees seem sufficiently non-obvious that the prudent thing to do to guarantee future stability is to initialized them -- it's cheap. I also initialized initialState because it seemed to fall in the same class, despite there being no warning for it. BUG=427616 Committed: https://skia.googlesource.com/skia/+/71d7f7f002332b9904bf12eb3f1908883f99120e

Patch Set 1 #

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

Messages

Total messages: 10 (4 generated)
brucedawson
A simple change to fix a couple of /analyze warnings and make the code more ...
5 years, 9 months ago (2015-02-26 00:51:27 UTC) #2
reed2
switching to brian's team
5 years, 9 months ago (2015-02-26 17:51:34 UTC) #4
bsalomon
Joshua if this lgty, then it lgtme.
5 years, 9 months ago (2015-02-26 20:50:37 UTC) #6
joshualitt
On 2015/02/26 20:50:37, bsalomon wrote: > Joshua if this lgty, then it lgtme. lgtm
5 years, 9 months ago (2015-02-26 21:10:26 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/957133002/1
5 years, 9 months ago (2015-02-26 21:15:50 UTC) #9
commit-bot: I haz the power
5 years, 9 months ago (2015-02-26 21:28:57 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/71d7f7f002332b9904bf12eb3f1908883f99120e

Powered by Google App Engine
This is Rietveld 408576698