Skip to content
Snippets Groups Projects
  1. Aug 04, 2020
    • Hans Wennborg's avatar
      [zlib] Add streaming inflate fuzzer · 493d4299
      Hans Wennborg authored
      This adds a new fuzzer which first deflates and then inflates some data
      one chunk at a time and verifies that it round-trips correctly. It's
      targeted at the recent bug where inffast_chunk was called with
      overlapping from and out buffers.
      
      I've verified that the fuzzer detects the incorrect inflate results when
      using Clang's -basic-aa-recphi option before the bug fix in e0f88a9.
      
      Furthermore, this patch adds asserts in inffast_chunk and other
      functions that verify there's no overlap of restrict-qualified buffers.
      (I've checked that the fuzzer hits the inffast_chunk assert before
      e0f88a9).
      
      To make those asserts work, this changes the build config to define
      ZLIB_DEBUG in debug and fuzzer builds.
      
      Bug: 1103818, 708726
      Change-Id: Ia3d5e7906b8b1a65d56a589d8a81d17661e638c2
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332705
      
      
      Commit-Queue: Hans Wennborg <hans@chromium.org>
      Reviewed-by: default avatarNico Weber <thakis@chromium.org>
      Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
      Cr-Original-Commit-Position: refs/heads/master@{#794482}
      Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
      Cr-Mirrored-Commit: 3eda17e22e6a3c4e44fdfa778b7d55f0a7c82e75
      493d4299
  2. Jul 27, 2020
  3. Jun 24, 2020
  4. May 26, 2020
  5. May 21, 2020
  6. Apr 29, 2020
    • Adenilson Cavalcanti's avatar
      [zlib] Re-land import canonical zlib inflate cover tests · 699e86dc
      Adenilson Cavalcanti authored
      There is a test suite in Canonical zlib that ensures correctness and
      coverage of inflate/deflate: the inflate cover (infcover.c) suite.
      
      This patch imports the inflate cover suite with the necessary changes
      to make it build and run under Chromes's C++11 GTEST test system.
      
      There are minimal changes (i.e. undefined 'local', miscellaneous C
      casts to use C++ casts, etc) so we can build it as C++ code and hook
      into GTEST e.g. use EXPECT_TRUE instead of C assert from <assert.h>.
      
      Adds a patch file for these changes, that can be applied on Canonical
      infcover should we need to sync with a new Canonical zlib release.
      
      TODO: there's one test accessing a symbol that causes link errors so
      comment that code out for now.
      
      Bug: 1032721
      Change-Id: I004a1357d46d909ad3a5a5bacc5f9ab9bfcb7809
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2168792
      
      
      Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
      Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
      Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
      Cr-Original-Commit-Position: refs/heads/master@{#763696}
      Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
      Cr-Mirrored-Commit: 26b3182d7a40f33da10a95bc69199af925dedbcc
      699e86dc
  7. Apr 22, 2020
  8. Apr 21, 2020
  9. Apr 20, 2020
  10. Apr 08, 2020
    • Adenilson Cavalcanti's avatar
      Adding a utest for small payloads · 61bddccf
      Adenilson Cavalcanti authored
      One of the optimizations (i.e. chunk_copy) will perform vector stores on
      16 bytes chunks instead of the original 3 bytes scalar operations.
      
      It is interesting to validate its safety while operating with small
      payloads (i.e. data input smaller than a single load/store).
      
      Even though it is a corner case (i.e. the payload would be smaller than
      the wrapper used for the DEFLATE stream for GZIP), it is good to certify
      that the optimization works as expected.
      
      This will also add gtest as a dependency as the plan is to write some
      tests to stress the optimizations we ship.
      
      Bug: 1032721
      Change-Id: Ifc6a81879e3dba6a9c4b7cfde80e7207258b934c
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128836
      
      
      Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
      Reviewed-by: default avatarChris Blume <cblume@chromium.org>
      Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
      Cr-Original-Commit-Position: refs/heads/master@{#757639}
      Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
      Cr-Mirrored-Commit: 272595ed5f469ee379e28dd5c40ef0230b6680a5
      61bddccf
  11. Feb 14, 2020
  12. Jan 28, 2020
    • Nico Weber's avatar
      Reformat remaining gn files. · b9b9a5af
      Nico Weber authored
      `gn format` recently changed its formatting behavior
      for deps, source, and a few other elements when they
      are assigned (with =) single-element lists to be consistent
      with the formatting of updates (with +=) with single-element.
      
      Now that we've rolled in a GN binary with the change,
      reformat all files so that people don't get presubmit
      warnings due to this.
      
      Most changes have landed by now via `git cl split`.
      This is what remains after two weeks.
      
      Bug: 1041419
      Change-Id: Ia813d744e57e5647266a91d4f6c725bf921fb11c
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024471
      
      
      Commit-Queue: Nico Weber <thakis@chromium.org>
      Auto-Submit: Nico Weber <thakis@chromium.org>
      Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
      Cr-Original-Commit-Position: refs/heads/master@{#735958}
      Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
      Cr-Mirrored-Commit: 852532f442a478b767bb452c63b5aa9b2e5e19fe
      b9b9a5af
  13. Jan 24, 2020
  14. Jan 08, 2020
  15. Dec 21, 2019
  16. Dec 12, 2019
  17. Aug 27, 2019
  18. Jun 24, 2019
  19. Jun 10, 2019
    • Jose Dapena Paz's avatar
      zlib: fix ARMv8 CRC32 compilation in GCC · bbacb136
      Jose Dapena Paz authored
      GCC compilation in ARM architectures with CRC32 extension was
      broken, as the extension was guarded for clang.
      
      For GCC we are enforcing armv8-a+crc architecture at module
      level, so the builtin extensions are available. Then we
      just include arm_acle.h to declare the required builtins.
      
      ThinLTO requires all modules to use same target, so this
      change makes GCC fail with ThinLTO (that was not supported
      anyway). Added a GN assert to explicitely fail in this case.
      
      Adapted from Vladislav Mukulov <vladislav.mukulov@lge.com>
      original patch.
      
      Bug: 819294
      Change-Id: Ifa5cf64318f88220052c44126db90bef999b7113
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642730
      
      
      Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
      Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
      Cr-Original-Commit-Position: refs/heads/master@{#667541}
      Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
      Cr-Mirrored-Commit: 68e95088b6f73f489aa1e1023b7864794627cae1
      bbacb136
  20. Apr 18, 2019
  21. Apr 15, 2019
  22. Apr 08, 2019
  23. Mar 28, 2019
  24. Jan 31, 2019
  25. Dec 13, 2018
  26. Oct 31, 2018
  27. Aug 23, 2018
  28. Aug 07, 2018
  29. May 30, 2018
  30. Mar 27, 2018
  31. Feb 16, 2018
    • Adenilson Cavalcanti's avatar
      Compute crc32 using ARMv8 specific instruction · 72356729
      Adenilson Cavalcanti authored
      CRC32 affects performance for both image decoding (PNG)
      as also in general browsing while accessing websites that serve
      content using compression (i.e. Content-Encoding: gzip).
      
      This patch implements an optimized CRC32 function using the
      dedicated instruction available in ARMv8a. We only support
      ARM Little-Endian (LE).
      
      This instruction is available in new Android devices featuring an
      ARMv8 SoC, like Nexus 5x and Google Pixel. It should be between
      3x (A72) to 7x faster (A53) than the C implementation currently used
      by zlib for 8KB vectors.
      
      This is performance critical code and can be called with both large (8KB)
      or small vectors, therefore we must avoid extraneous function calls or
      branching (otherwise the performance benefits are negated). So the use
      of 'public' variables to read the CPU features status flags
      (i.e. arm_cpu_enable_crc32 | pmull).
      
      Finally it also introduces code to perform run-time ARM CPU feature
      detection on the supported platforms: Android and Linux/CrOS. We build
      and link the CRC32 instruction dependent code, but will decide to use it
      at run-time if the ARM CPU supports the CRC32 instruction. Otherwise,
      we fallback to using zlib's default C implementation.
      
      This approach allows to use the instruction in both 32bits and 64bits and
      works fine either in ARMv7 or ARMv8 processor. I tested the generated
      Chrome apk in both a Nexus 6 (ARMv7) and a Google Pixel (ARMv8).
      
      The crc32 function benefited from input from Yang Zang and Mike Klein,
      while the arm_features benefited from input from Noel Gordon.
      
      Bug: 709716
      Change-Id: I315c1216f8b3a8d88607630a28737c41f52a2f5d
      Reviewed-on: https://chromium-review.googlesource.com/801108
      
      
      Reviewed-by: default avatarChris Blume <cblume@chromium.org>
      Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
      Commit-Queue: Noel Gordon <noel@chromium.org>
      Cr-Original-Commit-Position: refs/heads/master@{#537179}
      Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
      Cr-Mirrored-Commit: 28c9623083688b3a354c33bf77746f4c51f58826
      72356729
  32. Feb 12, 2018
Loading