Skip to content
Snippets Groups Projects
  1. Sep 27, 2022
  2. May 31, 2022
  3. May 17, 2022
  4. May 02, 2022
  5. Apr 30, 2022
    • Noel Gordon's avatar
      [zlib][asop] Complete USE_ZLIB_RABIN_KARP_ROLLING_HASH feature · 27c2f474
      Noel Gordon authored
      If USE_ZLIB_RABIN_KARP_ROLLING_HASH build-time option is defined, use
      the Rabin-Karp hash. This disables CRC SIMD hashing on ARM and Intel,
      which will degrade compression speed.
      
      However, the compressed output matches canonical zlib output, for the
      same input, and that should resolve ASOP OTA issue 1316541.
      
      To ensure the Rabin-Karp hash is used correctly in chromium zlib, the
      first step is to go back to using canonical fill_window(). To do this
      combine the ARM NEON and Intel SSE2 slide_hash() routines in a common
      framework called slide_hash_simd(). Remove fill_window_sse.c and undo
      deflate_read_buf() rename: name it back to canonical read_buf().
      
      Change insert_string(): by default it uses CRC32C hashes on all ports
      (ARM, Intel) so add code comments to state that. If Rabin-Karp hashes
      are enabled, disable CRC32C hashes.
      
      Add a new deflate internal state variable chromium_zlib_hash, used to
      detect which type of hashing is enabled (Rabin-Karp, CRC32C). Set the
      state variable in deflateInit2_ after cpu_check_features() detection,
      with #ifdef guards matching the #ifdef logic of insert_string().
      
      Change canonical fill_window() to insert hashes into {hash,prev} hash
      chains based on hash type (Rabin-Karp, CRC32C). Prior to this change,
      the ARM port was inserting Rabin-Karp hashes into hash chains even if
      CRC32 hashing was active when s->insert was > 0.
      
      Change longest_match() and deflate_fast(): update them to use the new
      deflate state variable chromium_zlib_hash.
      
      Compression performance degrades when Rabin-Karp hashing is used, but
      is unchanged when CRC32C hashing is enabled (chromium zlib default).
      
      Compat: if Rabin-Karp hashing is enabled, zlib-bench --check built as normal and against canonical zlib 1.2.11, produce the same compressed output for the snappy corpora for gzip,zlib,raw types and compression levels 1..9.
      
      Bug: 1316541
      Change-Id: I0d5ee6240f0b7eac4653d60a29d459d994c3871f
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3596671
      
      
      Reviewed-by: default avatarChris Blume <cblume@chromium.org>
      Commit-Queue: Noel Gordon <noel@chromium.org>
      Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#998062}
      NOKEYCHECK=True
      GitOrigin-RevId: 2bd100e46361a459b41a29212ea8f97a4837a06c
      27c2f474
  6. Oct 12, 2021
  7. Oct 06, 2021
  8. May 27, 2021
    • Jamie Madill's avatar
      [zlib] Do not build zip/unzip tools on WinUWP. · d0e636ed
      Jamie Madill authored
      These tools call IO APIs not available in UWP.
      
      Bug: 1207895
      Change-Id: I1fd627a72df29f1872d8086e4b0fe981b60999b0
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2920671
      
      
      Auto-Submit: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
      Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#887243}
      NOKEYCHECK=True
      GitOrigin-RevId: f7ffb67fa031795aacbe33954ff2a1c845d4cf2c
      d0e636ed
    • Noel Gordon's avatar
      [zlib] Build minizip zip and unzip tools · 5ef44f03
      Noel Gordon authored
      Minizip is a library provided by //third_party/zlib. Its zip and unzip
      tools can be built in a developer checkout for testing purposes with:
      
        autoninja -C out/Release minizip_bin
        autoninja -C out/Release miniunz_bin
      
      Add GN build rules for these files. Patch minizip and miniunz tools so
      they compile. Add a patch file and minizip.md for usage.
      
      On Android, disable large file support (see bug comment #12). off_t is
      32 bits (instead of 64 bits) and should compile on the bots where this
      patch failed compile before [1] and was reverted (CL:2895825).
      
      [1] Added CQ android_asan, android_archive_rel_ng try jobs to pre-test
      that compile works on these waterfall builders.
      
      Bug: 1207895
      Change-Id: Idbb3414a2c14fc541e31d6eff97859245296003f
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2919568
      
      
      Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
      Commit-Queue: Noel Gordon <noel@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#886990}
      NOKEYCHECK=True
      GitOrigin-RevId: a45e197d9695de4214f27e4c218b82e256b10d06
      5ef44f03
  9. May 14, 2021
  10. Nov 21, 2020
    • Hans Wennborg's avatar
      Remove zlib unittests from unit_tests; they have their own test binary · 92d41eb4
      Hans Wennborg authored
      These tests are in zlib_unittests, and that's already built and run by
      the bots (after crrev.com/804566).
      
      This removes the redundancy of building and running them twice, and
      takes some load of the already very large unit_tests target.
      
      While here, also move the zip and compression_utils to zlib_unittests
      and try to clean up chrome/test/BUILD.gn from unnecessary zlib
      references.
      
      Bug: 352073
      Change-Id: I3cfe020df9bc2699bbb160ae95b511840589e054
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2534930
      
      
      Commit-Queue: Hans Wennborg <hans@chromium.org>
      Commit-Queue: Nico Weber <thakis@chromium.org>
      Reviewed-by: default avatarNico Weber <thakis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#826858}
      GitOrigin-RevId: 49bce2f7a08bea183f39892a075be9ff92dc3c39
      92d41eb4
  11. Sep 04, 2020
  12. Sep 01, 2020
  13. 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
  14. Jul 27, 2020
  15. Jun 24, 2020
  16. May 26, 2020
  17. May 21, 2020
  18. 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
  19. Apr 22, 2020
  20. Apr 21, 2020
  21. Apr 20, 2020
  22. 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
  23. Feb 14, 2020
  24. 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
  25. Jan 24, 2020
  26. Jan 08, 2020
  27. Dec 21, 2019
  28. Dec 12, 2019
  29. Aug 27, 2019
  30. Jun 24, 2019
  31. 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
  32. Apr 18, 2019
Loading