|
|
DescriptionFix buffer overrun, bit overrun and add a test.
BUG=539691
Committed: https://skia.googlesource.com/skia/+/5520dede2968372e79c572e37b7f325524ee0739
Patch Set 1 #Patch Set 2 : fix release mode compile #Patch Set 3 : make msvc happy #Patch Set 4 : remove stack alloc array #Patch Set 5 : fix long line #
Total comments: 6
Patch Set 6 : rewrite #Patch Set 7 : fix rowbytes #Patch Set 8 : had x and y swapped #Messages
Total messages: 42 (16 generated)
Description was changed from ========== Fix array overrun and add test. BUG=539691 ========== to ========== Fix buffer overrun, bit overrun and add a test. BUG=539691 ==========
herb@google.com changed reviewers: + reed@google.com
The CQ bit was checked by herb@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: Build-Ubuntu-GCC-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86...)
The CQ bit was checked by herb@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/40001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-D...)
remove stack alloc array
The CQ bit was checked by herb@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/60001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
fix long line
hoooray! so glad you took the time to find/fix this. https://codereview.chromium.org/1453163002/diff/80001/src/core/SkBlitter.cpp File src/core/SkBlitter.cpp (right): https://codereview.chromium.org/1453163002/diff/80001/src/core/SkBlitter.cpp#... src/core/SkBlitter.cpp:137: U8CPU rightMask = 0xFF << (8 - (clip.width() & 7)); note: this will be bigger than a byte, something you fixed below for rite_mask with &. Do we need these two lines to be different? https://codereview.chromium.org/1453163002/diff/80001/tests/BlitMaskClip.cpp File tests/BlitMaskClip.cpp (right): https://codereview.chromium.org/1453163002/diff/80001/tests/BlitMaskClip.cpp#... tests/BlitMaskClip.cpp:18: virtual void blitH(int x, int y, int width) override { our new convention is to *not* say virtual when we say override. https://codereview.chromium.org/1453163002/diff/80001/tests/BlitMaskClip.cpp#... tests/BlitMaskClip.cpp:30: Perhaps a small block-comment? // Exercise all combinations of clips against a BW mask, to ensure we catch any asserts or out-of-bounds reads (from old bugs) < or something similar >
rewrite
fix rowbytes
https://codereview.chromium.org/1453163002/diff/80001/src/core/SkBlitter.cpp File src/core/SkBlitter.cpp (right): https://codereview.chromium.org/1453163002/diff/80001/src/core/SkBlitter.cpp#... src/core/SkBlitter.cpp:137: U8CPU rightMask = 0xFF << (8 - (clip.width() & 7)); On 2015/11/17 16:24:32, reed1 wrote: > note: this will be bigger than a byte, something you fixed below for rite_mask > with &. Do we need these two lines to be different? This ends up working because the bits_to_run code end up morally and'ing when when checking test. It would be a bug below because of the rite_mask comparison to zero. I rewrote the code. https://codereview.chromium.org/1453163002/diff/80001/tests/BlitMaskClip.cpp File tests/BlitMaskClip.cpp (right): https://codereview.chromium.org/1453163002/diff/80001/tests/BlitMaskClip.cpp#... tests/BlitMaskClip.cpp:18: virtual void blitH(int x, int y, int width) override { On 2015/11/17 16:24:32, reed1 wrote: > our new convention is to *not* say virtual when we say override. Done. https://codereview.chromium.org/1453163002/diff/80001/tests/BlitMaskClip.cpp#... tests/BlitMaskClip.cpp:30: On 2015/11/17 16:24:32, reed1 wrote: > Perhaps a small block-comment? > > // Exercise all combinations of clips against a BW mask, to ensure we catch any > asserts or out-of-bounds reads (from old bugs) < or something similar > Done.
The CQ bit was checked by herb@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/120001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_6...)
mtklein@google.com changed reviewers: + mtklein@google.com
May want to keep an eye on gold diffs too: https://gold.skia.org/search2?issue=1453163002&unt=true&query=source_type%3Dg...
had x and y swapped
The CQ bit was checked by herb@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/140001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by herb@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/140001
Note for Reviewers: The CQ is waiting for an approval. If you believe that the CL is not ready yet, or if you would like to L-G-T-M with comments then please uncheck the CQ checkbox. Waiting for LGTM from valid reviewer(s) till 2015-11-18 03:41 UTC
Ok. The presubmits and gold look good. PTAL Trybot results: https://gold.skia.org/search2?issue=1453163002&unt=true&query=source_type%3Dg...
The CQ bit was unchecked by commit-bot@chromium.org
No LGTM from a valid reviewer yet. Please ask for an LGTM from a full Skia committer
lgtm
The CQ bit was checked by herb@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1453163002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1453163002/140001
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as https://skia.googlesource.com/skia/+/5520dede2968372e79c572e37b7f325524ee0739 |