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

Issue 2797473003: Add LLVM fuzzer: Skia color space and color transform (Closed)

Created:
3 years, 8 months ago by Noel Gordon
Modified:
3 years, 8 months ago
CC:
chromium-reviews, fuzzing_chromium.org, scroggo_chromium, hcm1, msarett1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add LLVM fuzzer: Skia color space and color transform Add common color profile data file color_space_data.h, which is a separate file so it can be included in other fuzzers. Add fuzzer that reads test input and creates a color profile from it (or bails if not). Given that profile |test|, create another profile |srgb| used to transform colors to/from when running the color transform fuzzer test stage. Speed: achieves ~1100 execs/s on Mac Air and 1900 execs/s on my Mac Pro. Seed corpus of ICC color profiles for the fuzzer uploaded to the skia_color_space_fuzzer GCS bucket. Set max_len to 4Meg (color profiles can be large and this is the limit that Chrome accepts), and use the ICC profile dict added in http://crrev.com/461603 BUG=708016 Review-Url: https://codereview.chromium.org/2797473003 Cr-Commit-Position: refs/heads/master@{#463156} Committed: https://chromium.googlesource.com/chromium/src/+/373b1ecb464977173aa74566bb6f672be10df687

Patch Set 1 #

Total comments: 20

Patch Set 2 : Redesign the pixel generator. #

Total comments: 8

Patch Set 3 : Use hash and prgn, pre-compute srgb profiles. #

Total comments: 11

Patch Set 4 : Use size_t for alloc sizes. #

Patch Set 5 : Make hash const. #

Total comments: 8

Patch Set 6 : rm -f DCHECK, use static buffers. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+481 lines, -0 lines) Patch
M testing/libfuzzer/fuzzers/BUILD.gn View 1 1 chunk +13 lines, -0 lines 0 comments Download
A testing/libfuzzer/fuzzers/color_space_data.h View 1 1 chunk +379 lines, -0 lines 0 comments Download
A testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc View 1 2 3 4 5 1 chunk +89 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (39 generated)
Noel Gordon
PTAL.
3 years, 8 months ago (2017-04-04 12:14:12 UTC) #7
Noel Gordon
https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode33 testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc:33: uint32_t data[kPixels * 4]; This is a fine source ...
3 years, 8 months ago (2017-04-04 12:23:16 UTC) #8
mmoroz
Thanks for writing this target. It looks pretty interesting, I left some comments. https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/BUILD.gn File ...
3 years, 8 months ago (2017-04-04 13:43:07 UTC) #11
Noel Gordon
https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/BUILD.gn File testing/libfuzzer/fuzzers/BUILD.gn (right): https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/BUILD.gn#newcode423 testing/libfuzzer/fuzzers/BUILD.gn:423: fuzzer_test("skia_color_space_fuzzer") { On 2017/04/04 13:43:06, mmoroz wrote: > Could ...
3 years, 8 months ago (2017-04-05 14:14:08 UTC) #14
scroggo_chromium
https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/BUILD.gn File testing/libfuzzer/fuzzers/BUILD.gn (right): https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/BUILD.gn#newcode423 testing/libfuzzer/fuzzers/BUILD.gn:423: fuzzer_test("skia_color_space_fuzzer") { On 2017/04/05 14:14:07, noel gordon wrote: > ...
3 years, 8 months ago (2017-04-05 21:02:47 UTC) #19
mmoroz
Looks good, but we should remove hacky |GeneratePixels| method and use a part of the ...
3 years, 8 months ago (2017-04-06 08:26:37 UTC) #20
mmoroz
https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode60 testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc:60: test = SkColorSpace::MakeICC(data, size); On 2017/04/05 14:14:07, noel gordon ...
3 years, 8 months ago (2017-04-06 08:31:27 UTC) #21
Noel Gordon
On 2017/04/06 08:26:37, mmoroz wrote: > Looks good, but we should remove hacky |GeneratePixels| method ...
3 years, 8 months ago (2017-04-07 12:28:40 UTC) #25
Noel Gordon
https://codereview.chromium.org/2797473003/diff/20001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): https://codereview.chromium.org/2797473003/diff/20001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode23 testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc:23: pixels[i] = (memory = memory << 3 ^ kSRGBData[1024 ...
3 years, 8 months ago (2017-04-07 12:48:58 UTC) #26
Noel Gordon
On 2017/04/06 08:31:27, mmoroz wrote: > https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc > File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): > > https://codereview.chromium.org/2797473003/diff/1/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode60 > ...
3 years, 8 months ago (2017-04-07 13:16:06 UTC) #27
mmoroz
Noel, please excuse me if "hacky" sounds offensive to you. I've seen it multiple times ...
3 years, 8 months ago (2017-04-07 13:39:08 UTC) #29
mmoroz
By the way, what does 'IC' mean?
3 years, 8 months ago (2017-04-07 13:44:12 UTC) #32
Noel Gordon
On 2017/04/07 13:39:08, mmoroz wrote: > Noel, please excuse me if "hacky" sounds offensive to ...
3 years, 8 months ago (2017-04-07 15:36:55 UTC) #33
Noel Gordon
https://codereview.chromium.org/2797473003/diff/40001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): https://codereview.chromium.org/2797473003/diff/40001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode15 testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc:15: static constexpr unsigned kPixels = 2048 / 4; On ...
3 years, 8 months ago (2017-04-07 16:03:03 UTC) #34
Noel Gordon
On 2017/04/07 13:44:12, mmoroz wrote: > By the way, what does 'IC' mean? IC == ...
3 years, 8 months ago (2017-04-07 16:03:32 UTC) #35
mmoroz
https://codereview.chromium.org/2797473003/diff/40001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): https://codereview.chromium.org/2797473003/diff/40001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode21 testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc:21: pixels = new uint32_t[kPixels * 4]; On 2017/04/07 16:03:03, ...
3 years, 8 months ago (2017-04-08 11:01:38 UTC) #44
mmoroz
Copied the last round of comments to the latest patchset (for easier fixing / checking). ...
3 years, 8 months ago (2017-04-08 11:10:59 UTC) #45
Noel Gordon
https://codereview.chromium.org/2797473003/diff/80001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc File testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc (right): https://codereview.chromium.org/2797473003/diff/80001/testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc#newcode17 testing/libfuzzer/fuzzers/skia_color_space_fuzzer.cc:17: static uint32_t* pixels = nullptr; On 2017/04/08 11:10:59, mmoroz ...
3 years, 8 months ago (2017-04-08 13:23:01 UTC) #46
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/2797473003/100001
3 years, 8 months ago (2017-04-08 13:24:27 UTC) #49
Noel Gordon
On 2017/04/08 11:10:59, mmoroz (OOO) wrote: > Copied the last round of comments to the ...
3 years, 8 months ago (2017-04-08 13:35:48 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/267747)
3 years, 8 months ago (2017-04-08 16:19:24 UTC) #53
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/2797473003/100001
3 years, 8 months ago (2017-04-08 16:22:33 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/267760)
3 years, 8 months ago (2017-04-08 19:17:17 UTC) #57
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/2797473003/100001
3 years, 8 months ago (2017-04-09 17:44:10 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/244831)
3 years, 8 months ago (2017-04-09 17:54:33 UTC) #61
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/2797473003/100001
3 years, 8 months ago (2017-04-09 23:20:43 UTC) #63
commit-bot: I haz the power
3 years, 8 months ago (2017-04-10 00:26:01 UTC) #66
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/373b1ecb464977173aa74566bb6f...

Powered by Google App Engine
This is Rietveld 408576698