|
|
Created:
5 years, 9 months ago by hal.canary Modified:
5 years, 9 months ago Reviewers:
mtklein CC:
reviews_skia.org, scroggo Base URL:
https://skia.googlesource.com/skia.git@master Target Ref:
refs/heads/master Project:
skia Visibility:
Public. |
DescriptionFlate: fix valgrind miniz Conditional-jump-or-move-depends... error
Committed: https://skia.googlesource.com/skia/+/e0638f8ecfb609c89cab1aa8b498ad3f368b89d3
Patch Set 1 #
Total comments: 2
Patch Set 2 : 2015-02-27 (Friday) 13:18:23 EST #Messages
Total messages: 15 (3 generated)
halcanary@google.com changed reviewers: + mtklein@google.com
The CQ bit was checked by halcanary@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/964933003/1
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-02-28 00:12 UTC
https://codereview.chromium.org/964933003/diff/1/src/core/SkFlate.cpp File src/core/SkFlate.cpp (right): https://codereview.chromium.org/964933003/diff/1/src/core/SkFlate.cpp#newcode28 src/core/SkFlate.cpp:28: void* alloc = sk_calloc_throw(items * size); Do we perhaps need to return something?
https://codereview.chromium.org/964933003/diff/1/src/core/SkFlate.cpp File src/core/SkFlate.cpp (right): https://codereview.chromium.org/964933003/diff/1/src/core/SkFlate.cpp#newcode28 src/core/SkFlate.cpp:28: void* alloc = sk_calloc_throw(items * size); On 2015/02/27 18:12:50, mtklein wrote: > Do we perhaps need to return something? HOW DOES THAT COMPILE!
The CQ bit was checked by halcanary@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/964933003/20001
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-02-28 00:19 UTC
lgtm IIRC, there are actually parts of the DEFLATE algorithm that function correctly when using uninitialized memory. This is probably that. I think we'd have to suppress zlib too if we start building that ourselves. http://www.zlib.net/zlib_faq.html#faq36
On 2015/02/27 18:27:36, mtklein wrote: > IIRC, there are actually parts of the DEFLATE algorithm that function correctly > when using uninitialized memory. This is probably that. I think we'd have to > suppress zlib too if we start building that ourselves. > > http://www.zlib.net/zlib_faq.html#faq36 Let's proceed under the assumptions that (1) calloc isn't much overhead compared ti the rest of deflate, and (2) for consistency, sk_[cm]alloc is better than [cm]alloc.
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/e0638f8ecfb609c89cab1aa8b498ad3f368b89d3
Message was sent while issue was closed.
On 2015/02/27 18:35:51, Hal Canary wrote: > On 2015/02/27 18:27:36, mtklein wrote: > > IIRC, there are actually parts of the DEFLATE algorithm that function > correctly > > when using uninitialized memory. This is probably that. I think we'd have to > > suppress zlib too if we start building that ourselves. > > > > http://www.zlib.net/zlib_faq.html#faq36 > > Let's proceed under the assumptions that (1) calloc isn't much overhead compared > ti the rest of deflate, and (2) for consistency, sk_[cm]alloc is better than > [cm]alloc. Oh sure, yeah. Just pointing out this might not be as terrifying as it seems. I bet the system zlib was doing the same, but Valgrind just couldn't see it.
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/964953002/ by schenney@chromium.org. The reason for reverting is: Breaks the chrome build. ../../third_party/skia/src/core/SkFlate.cpp:37:22: error: assigning to 'MOZ_Z_alloc_func' (aka 'MOZ_Z_voidpf (*)(MOZ_Z_voidpf, MOZ_Z_uInt, MOZ_Z_uInt)') from incompatible type 'void *(*)(void *, size_t, size_t)': type mismatch at 2nd parameter ('MOZ_Z_uInt' (aka 'unsigned int') vs 'size_t' (aka 'unsigned long')) flateData.zalloc = &skia_alloc_func; ^ ~~~~~~~~~~~~~~~~ ../../third_party/skia/src/core/SkFlate.cpp:180:28: error: assigning to 'MOZ_Z_alloc_func' (aka 'MOZ_Z_voidpf (*)(MOZ_Z_voidpf, MOZ_Z_uInt, MOZ_Z_uInt)') from incompatible type 'void *(*)(void *, size_t, size_t)': type mismatch at 2nd parameter ('MOZ_Z_uInt' (aka 'unsigned int') vs 'size_t' (aka 'unsigned long')) fImpl->fZStream.zalloc = &skia_alloc_func; . |