diff options
author | mtklein <mtklein@chromium.org> | 2016-02-06 19:12:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-06 19:12:23 -0800 |
commit | e721a8e883231af1878772ecd23be325113fcc48 (patch) | |
tree | 794d3a66459d5955f005272381e65f42423d90a3 /src/codec | |
parent | 23e78d372f01867f6a96a436b9e5f24fd4f8e2e3 (diff) |
flags and hacks to get MSAN bot going
This disables a few tests in DM:
- one BlurLargeImage GM maybe is really broken
- FontMgrAndroidParser uses libexpat, which I've not (yet?) built from source,
so MSAN can't see into it.
This extends some of the MSAN stifling we added around SkImageDecoder_libjpeg to SkCodec, and skips .wbmps, .pngs, and .bmps. We're only seeing issues in colortables for .png and .bmp.
I think I can probably back out disabling Codec and the RAW image decodes...
they should all be covered by the libjpeg stifles.
BUG=skia:4550,skia:4900
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1673663002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot
TBR=msarett@google.com
Review URL: https://codereview.chromium.org/1673663002
Diffstat (limited to 'src/codec')
-rw-r--r-- | src/codec/SkJpegCodec.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp index 112078b97c..aefe264f1a 100644 --- a/src/codec/SkJpegCodec.cpp +++ b/src/codec/SkJpegCodec.cpp @@ -6,6 +6,7 @@ */ #include "SkCodec.h" +#include "SkMSAN.h" #include "SkJpegCodec.h" #include "SkJpegDecoderMgr.h" #include "SkJpegUtility_codec.h" @@ -215,7 +216,7 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dst) { } /* - * Checks if we can natively scale to the requested dimensions and natively scales the + * Checks if we can natively scale to the requested dimensions and natively scales the * dimensions if possible */ bool SkJpegCodec::onDimensionsSupported(const SkISize& size) { @@ -308,6 +309,7 @@ SkCodec::Result SkJpegCodec::onGetPixels(const SkImageInfo& dstInfo, for (uint32_t y = 0; y < dstHeight; y++) { // Read rows of the image uint32_t lines = jpeg_read_scanlines(dinfo, &dstRow, 1); + sk_msan_mark_initialized(dstRow, dstRow + dstRowBytes, "skbug.com/4550"); // If we cannot read enough rows, assume the input is incomplete if (lines != 1) { @@ -399,24 +401,27 @@ SkCodec::Result SkJpegCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, return kSuccess; } -int SkJpegCodec::onGetScanlines(void* dst, int count, size_t rowBytes) { +int SkJpegCodec::onGetScanlines(void* dst, int count, size_t dstRowBytes) { // Set the jump location for libjpeg errors if (setjmp(fDecoderMgr->getJmpBuf())) { return fDecoderMgr->returnFailure("setjmp", kInvalidInput); } // Read rows one at a time JSAMPLE* dstRow; + size_t srcRowBytes = get_row_bytes(fDecoderMgr->dinfo()); if (fSwizzler) { // write data to storage row, then sample using swizzler dstRow = fSrcRow; } else { // write data directly to dst + SkASSERT(count == 1 || dstRowBytes >= srcRowBytes); dstRow = (JSAMPLE*) dst; } for (int y = 0; y < count; y++) { // Read row of the image uint32_t rowsDecoded = jpeg_read_scanlines(fDecoderMgr->dinfo(), &dstRow, 1); + sk_msan_mark_initialized(dstRow, dstRow + srcRowBytes, "skbug.com/4550"); if (rowsDecoded != 1) { fDecoderMgr->dinfo()->output_scanline = this->dstInfo().height(); return y; @@ -425,9 +430,9 @@ int SkJpegCodec::onGetScanlines(void* dst, int count, size_t rowBytes) { if (fSwizzler) { // use swizzler to sample row fSwizzler->swizzle(dst, dstRow); - dst = SkTAddOffset<JSAMPLE>(dst, rowBytes); + dst = SkTAddOffset<JSAMPLE>(dst, dstRowBytes); } else { - dstRow = SkTAddOffset<JSAMPLE>(dstRow, rowBytes); + dstRow = SkTAddOffset<JSAMPLE>(dstRow, dstRowBytes); } } return count; |