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

Issue 1872853002: Fix race condition in SkROBuffer. (Closed)

Created:
4 years, 8 months ago by reed1
Modified:
4 years, 8 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix race condition in SkROBuffer. SkBufferBlock::fUsed may be updated by the writer while a reader is attempting to read it. BUG=chromium:601578 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872853002 Committed: https://skia.googlesource.com/skia/+/377add74267e5e0c94521858fb1f9ac5cf299667

Patch Set 1 #

Total comments: 3

Patch Set 2 : use constructors to make fCapacity const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -53 lines) Patch
M include/core/SkRWBuffer.h View 3 chunks +3 lines, -4 lines 0 comments Download
M src/core/SkRWBuffer.cpp View 1 10 chunks +33 lines, -44 lines 0 comments Download
M tests/DataRefTest.cpp View 1 chunk +1 line, -5 lines 0 comments Download

Messages

Total messages: 23 (9 generated)
reed1
4 years, 8 months ago (2016-04-08 18:02:49 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1872853002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1872853002/1
4 years, 8 months ago (2016-04-08 18:02:57 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-08 18:17:29 UTC) #7
scroggo
This seems like a fine approach to me. Ben or mtklein, did I miss anything? ...
4 years, 8 months ago (2016-04-08 18:18:52 UTC) #8
bungeman-skia
https://codereview.chromium.org/1872853002/diff/1/src/core/SkRWBuffer.cpp File src/core/SkRWBuffer.cpp (right): https://codereview.chromium.org/1872853002/diff/1/src/core/SkRWBuffer.cpp#newcode17 src/core/SkRWBuffer.cpp:17: size_t fCapacity; // never changes after the block is ...
4 years, 8 months ago (2016-04-08 18:39:29 UTC) #10
reed1
https://codereview.chromium.org/1872853002/diff/1/src/core/SkRWBuffer.cpp File src/core/SkRWBuffer.cpp (right): https://codereview.chromium.org/1872853002/diff/1/src/core/SkRWBuffer.cpp#newcode17 src/core/SkRWBuffer.cpp:17: size_t fCapacity; // never changes after the block is ...
4 years, 8 months ago (2016-04-08 19:18:11 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1872853002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1872853002/20001
4 years, 8 months ago (2016-04-08 19:18:46 UTC) #13
reed1
ok to land this, and then build upon it in a 2nd CL, or do ...
4 years, 8 months ago (2016-04-08 19:19:41 UTC) #14
reed1
note: this does not address validate() being called from the reader-thread, and does not try ...
4 years, 8 months ago (2016-04-08 19:21:02 UTC) #15
mtklein
On 2016/04/08 at 19:19:41, reed wrote: > ok to land this, and then build upon ...
4 years, 8 months ago (2016-04-08 19:33:11 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-08 19:35:19 UTC) #18
scroggo
lgtm
4 years, 8 months ago (2016-04-08 19:44:25 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1872853002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1872853002/20001
4 years, 8 months ago (2016-04-08 19:46:21 UTC) #21
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 19:47:17 UTC) #23
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://skia.googlesource.com/skia/+/377add74267e5e0c94521858fb1f9ac5cf299667

Powered by Google App Engine
This is Rietveld 408576698