]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
4 years agoDisallow semantic interposition in ELF shared libraries if supported by the compiler.
Hans Kristian Rosbach [Mon, 11 Jan 2021 17:44:09 +0000 (18:44 +0100)] 
Disallow semantic interposition in ELF shared libraries if supported by the compiler.
This disallows calls to our own exported functions being replaced by LD_PRELOAD, thus
avoiding the potential bugs and allowing the compiler to optimize better.

4 years agoFixed previous match length not reset when match start reset.
Nathan Moinvaziri [Mon, 4 Jan 2021 05:16:40 +0000 (21:16 -0800)] 
Fixed previous match length not reset when match start reset.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24294

4 years agoAdd check in check_match for invalid match position.
Nathan Moinvaziri [Mon, 4 Jan 2021 05:56:50 +0000 (21:56 -0800)] 
Add check in check_match for invalid match position.

4 years agoImprove check_match output to print hex values of mismatch characters and character...
Nathan Moinvaziri [Mon, 4 Jan 2021 05:34:57 +0000 (21:34 -0800)] 
Improve check_match output to print hex values of mismatch characters and character index.

4 years agodocs: fix simple typo, stragety -> strategy
Tim Gates [Mon, 14 Dec 2020 11:51:12 +0000 (22:51 +1100)] 
docs: fix simple typo, stragety -> strategy

There is a small typo in INDEX.md.

Should read `strategy` rather than `stragety`.

4 years agoFixed macOS CI instance to use GCC
Nathan Moinvaziri [Wed, 2 Dec 2020 06:58:19 +0000 (22:58 -0800)] 
Fixed macOS CI instance to use GCC

4 years agodarwin ios/mac m1 cpu features detection update proposal
David CARLIER [Fri, 1 Jan 2021 08:56:10 +0000 (08:56 +0000)] 
darwin ios/mac m1 cpu features detection update proposal

4 years agoSeparate sanitizers so they can be run independently.
Nathan Moinvaziri [Sun, 22 Nov 2020 22:28:12 +0000 (14:28 -0800)] 
Separate sanitizers so they can be run independently.

4 years agoSet verbosity to 0 to limit CI log output.
Nathan Moinvaziri [Wed, 4 Nov 2020 07:16:10 +0000 (23:16 -0800)] 
Set verbosity to 0 to limit CI log output.

4 years agoDisable codecov in MinGW i686 due to gcov locking error when multiple tests run at...
Nathan Moinvaziri [Wed, 4 Nov 2020 03:57:25 +0000 (19:57 -0800)] 
Disable codecov in MinGW i686 due to gcov locking error when multiple tests run at the same time.

  profiling:gzlib.c.gcda:Data file mismatch - some data files may have been concurrently updated without locking support

4 years agoAdd check that tests UNALIGNED_OK without UNALIGNED64_OK.
Hans Kristian Rosbach [Mon, 2 Nov 2020 16:58:42 +0000 (17:58 +0100)] 
Add check that tests UNALIGNED_OK without UNALIGNED64_OK.

Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
4 years agoSeparate crc32 and crc32_combine tables so the crc32_combine tables are not included...
Nathan Moinvaziri [Tue, 10 Nov 2020 01:02:38 +0000 (17:02 -0800)] 
Separate crc32 and crc32_combine tables so the crc32_combine tables are not included when not used if statically linking. Reduces code size by 4k.

4 years agoAdd AArch64 feature detection support for FreeBSD
Greg V [Sat, 14 Nov 2020 11:29:17 +0000 (14:29 +0300)] 
Add AArch64 feature detection support for FreeBSD

4 years agoCMake: fix 'ALDER32' typo in feature info message
Greg V [Sat, 14 Nov 2020 11:14:36 +0000 (14:14 +0300)] 
CMake: fix 'ALDER32' typo in feature info message

4 years agoFixed coverity dereference after null check in gz_compress CID 303796.
Nathan Moinvaziri [Mon, 9 Nov 2020 02:26:06 +0000 (18:26 -0800)] 
Fixed coverity dereference after null check in gz_compress CID 303796.

4 years agoFixed ubsan error when building tree with no symbols. #782
Nathan Moinvaziri [Sat, 31 Oct 2020 01:40:28 +0000 (18:40 -0700)] 
Fixed ubsan error when building tree with no symbols. #782

When there are no symbols in the tree we skip build_tree calculations and emit a block using static tree with no codes.

trees.c:357:19: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long'
    #0 0x1000ed79b in build_tree trees.c:357
    #1 0x1000ea3f5 in zng_tr_flush_block trees.c:649
    #2 0x100090ab0 in deflate_slow deflate_slow.c:131
    #3 0x1000572bc in zng_deflate deflate.c:990
    #4 0x1000aecd3 in gz_comp gzwrite.c:125
    #5 0x1000b05df in zng_gzclose_w gzwrite.c:511
    #6 0x1000967a4 in zng_gzclose gzlib.c:253
    #7 0x100004f70 in test_gzio example.c:133
    #8 0x100010c5b in main example.c:1034
    #9 0x7fff71f57cc8 in start+0x0 (libdyld.dylib:x86_64+0x1acc8)

4 years agoFixed conditional expression is constant maintainer warnings.
Nathan Moinvaziri [Fri, 2 Oct 2020 06:10:19 +0000 (23:10 -0700)] 
Fixed conditional expression is constant maintainer warnings.

  chunkset_tpl.h(42,47): warning C4127: conditional expression is constant
  functable.c(381,44): warning C4127: conditional expression is constant

4 years agoFixed casting warnings when comparing MAX_DIST.
Nathan Moinvaziri [Fri, 2 Oct 2020 05:57:38 +0000 (22:57 -0700)] 
Fixed casting warnings when comparing MAX_DIST.

  deflate_medium.c(127,76): warning C4244: '=': conversion from 'unsigned int' to 'Pos', possible loss of data

4 years agoFixed conversion warning when assigning wsize to Pos variable.
Nathan Moinvaziri [Fri, 2 Oct 2020 05:59:27 +0000 (22:59 -0700)] 
Fixed conversion warning when assigning wsize to Pos variable.

  deflate.c(218,1): warning C4244: 'initializing': conversion from 'unsigned int' to 'Pos', possible loss of data
  deflate.c(241,1): warning C4244: 'initializing': conversion from 'unsigned int' to 'Pos', possible loss of data

4 years agoFixed conversion warning when calling zng_tr_tally_dist. Signature for dist and len...
Nathan Moinvaziri [Fri, 2 Oct 2020 05:53:50 +0000 (22:53 -0700)] 
Fixed conversion warning when calling zng_tr_tally_dist. Signature for dist and len now match zng_emit_dist.

  deflate.c(1575,67): warning C4244: 'function': conversion from 'uint32_t' to 'unsigned char', possible loss of data
  deflate_fast.c(60,94): warning C4244: 'function': conversion from 'uint32_t' to 'unsigned char', possible loss of data
  deflate_medium.c(39,102): warning C4244: 'function': conversion from 'int' to 'unsigned char', possible loss of data
  deflate_slow.c(75,101): warning C4244: 'function': conversion from 'unsigned int' to 'unsigned char', possible loss of data

4 years agoFixed str uint32_t to uint16_t casting warnings in inflate_string_tpl.h
Nathan Moinvaziri [Fri, 2 Oct 2020 05:49:28 +0000 (22:49 -0700)] 
Fixed str uint32_t to uint16_t casting warnings in inflate_string_tpl.h

  insert_string_tpl.h(50,26): warning C4244: '=': conversion from 'const uint32_t' to 'Pos', possible loss of data
  insert_string_tpl.h(67,1): warning C4244: 'initializing': conversion from 'const uint32_t' to 'Pos', possible loss of data

4 years agoFixed match_start uint32_t to uint16_t casting warnings in deflate_medium.c
Nathan Moinvaziri [Fri, 2 Oct 2020 05:47:22 +0000 (22:47 -0700)] 
Fixed match_start uint32_t to uint16_t casting warnings in deflate_medium.c

  deflate_medium.c(204,49): warning C4244: '=': conversion from 'unsigned int' to 'uint16_t', possible loss of data
  deflate_medium.c(217,59): warning C4244: '=': conversion from 'unsigned int' to 'uint16_t', possible loss of data
  deflate_medium.c(238,46): warning C4244: '=': conversion from 'unsigned int' to 'uint16_t', possible loss of data
  deflate_medium.c(250,56): warning C4244: '=': conversion from 'unsigned int' to 'uint16_t', possible loss of data

4 years agoFixed ubsan warning in gzfread due to size_t overflow. #783
Nathan Moinvaziri [Sat, 31 Oct 2020 04:14:42 +0000 (21:14 -0700)] 
Fixed ubsan warning in gzfread due to size_t overflow. #783

gzread.c:398:18: runtime error: unsigned integer overflow: 2 * 18446744073709551615 cannot be represented in type 'unsigned long'
    #0 0x10009d31e in zng_gzfread gzread.c:398
    #1 0x100005b1a in test_gzio example.c:213
    #2 0x10001093b in main example.c:1034
    #3 0x7fff71f57cc8 in start+0x0 (libdyld.dylib:x86_64+0x1acc8)

4 years agoFixed format specifier warning in build_tree call to Tracev.
Nathan Moinvaziri [Sat, 31 Oct 2020 01:47:10 +0000 (18:47 -0700)] 
Fixed format specifier warning in build_tree call to Tracev.

  Format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')

4 years agoFixed minigzip_fuzzer not compiling on latest macOS due to missing _POSIX_C_SOURCE.
Nathan Moinvaziri [Sat, 31 Oct 2020 02:33:11 +0000 (19:33 -0700)] 
Fixed minigzip_fuzzer not compiling on latest macOS due to missing _POSIX_C_SOURCE.

4 years agoRemove unnecessary name array from matrix.
Nathan Moinvaziri [Mon, 2 Nov 2020 03:12:13 +0000 (19:12 -0800)] 
Remove unnecessary name array from matrix.

4 years agoCombine option and add_feature_info in CMake.
Nathan Moinvaziri [Sun, 20 Sep 2020 19:22:44 +0000 (12:22 -0700)] 
Combine option and add_feature_info in CMake.

4 years agoSmall formatting changes in inflate.c, inflate.h and inffast.c
Hans Kristian Rosbach [Sun, 18 Oct 2020 15:31:51 +0000 (17:31 +0200)] 
Small formatting changes in inflate.c, inflate.h and inffast.c

4 years agoinflate: add SET_BAD macro, to make inflate.c a little cleaner.
Hans Kristian Rosbach [Sun, 18 Oct 2020 14:19:51 +0000 (16:19 +0200)] 
inflate: add SET_BAD macro, to make inflate.c a little cleaner.

4 years agoFixed formatting in check_c_source_compiles checks for consistency.
Nathan Moinvaziri [Sat, 17 Oct 2020 21:47:31 +0000 (14:47 -0700)] 
Fixed formatting in check_c_source_compiles checks for consistency.

4 years agoFixed ptrdiff_t redefined static analysis warning on GCC. Failing ptrdiff_t detection...
Nathan Moinvaziri [Sat, 17 Oct 2020 21:31:07 +0000 (14:31 -0700)] 
Fixed ptrdiff_t redefined static analysis warning on GCC. Failing ptrdiff_t detection due to variable unused warning combined with -Werror.

  In file included from zlib-ng/zlib-ng.h:33,
                   from zlib-ng/zutil.h:38,
                   from zlib-ng/adler32.c:7:
  zlib-ng/zconf-ng.h:118:18: error: conflicting types for ‘ptrdiff_t’
    118 | typedef uint64_t ptrdiff_t;
        |                  ^~~~~~~~~
  In file included from zlib-ng/zutil.h:31,
                   from zlib-ng/adler32.c:7:
  stddef.h:143:26: note: previous declaration of ‘ptrdiff_t’ was here
    143 | typedef __PTRDIFF_TYPE__ ptrdiff_t;
        |                          ^~~~~~~~~

4 years agoAdded verbose flag to CI to see sanitizer output.
Nathan Moinvaziri [Fri, 2 Oct 2020 05:10:40 +0000 (22:10 -0700)] 
Added verbose flag to CI to see sanitizer output.

4 years agoFixed unsigned integer overflow ASAN error when hash_head > s->strstart.
Nathan Moinvaziri [Sun, 20 Sep 2020 02:39:42 +0000 (19:39 -0700)] 
Fixed unsigned integer overflow ASAN error when hash_head > s->strstart.

  zlib-ng/deflate_medium.c:244:47: runtime error: unsigned integer overflow: 58442 - 58452 cannot be represented in type 'unsigned int'

Co-authored-by: Mika Lindqvist <postmaster@raasu.org>
Co-authored-by: Hans Kristian Rosbach <hk-git@circlestorm.org>
4 years agoElevate warnings to errors to trigger failure on static analyzer
Gabriel A. Devenyi [Tue, 29 Sep 2020 01:45:28 +0000 (21:45 -0400)] 
Elevate warnings to errors to trigger failure on static analyzer

4 years agoFix switchlevels calling deflateParams() with a stale buffer
Ilya Leoshkevich [Mon, 28 Sep 2020 19:54:54 +0000 (21:54 +0200)] 
Fix switchlevels calling deflateParams() with a stale buffer

Fixes: #776
4 years agoFix incorrect inflateSyncPoint() return value with DFLTCC
Ilya Leoshkevich [Mon, 28 Sep 2020 19:21:49 +0000 (21:21 +0200)] 
Fix incorrect inflateSyncPoint() return value with DFLTCC

DFLTCC does not provide the necessary information to implement
inflateSyncPoint() - Incomplete-Function Status and Incomplete-Function
Length are the fields that provide the relevant information, but
unfortunately it's not enough. If DFLTCC is in use, the current code
checks software decompression state and always returns 0. This
(rightfully) confuses rsync, so fix by returning Z_STREAM_ERROR
instead.

4 years agoFixed left shift ubsan warning in PULLBYTE.
Nathan Moinvaziri [Mon, 5 Oct 2020 01:36:25 +0000 (18:36 -0700)] 
Fixed left shift ubsan warning in PULLBYTE.

  infback.c:200:13: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
  624: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/runner/work/zlib-ng/zlib-ng/infback.c:200:13 in

4 years agoAvoid shifts of negative values inflateMark().
Mark Adler [Sun, 6 Sep 2015 00:45:55 +0000 (17:45 -0700)] 
Avoid shifts of negative values inflateMark().

The C standard says that bit shifts of negative integers is
undefined.  This casts to unsigned values to assure a known
result.

4 years agoAbort CI tests on sanitizer error.
Nathan Moinvaziri [Sat, 3 Oct 2020 21:34:08 +0000 (14:34 -0700)] 
Abort CI tests on sanitizer error.

4 years agoFix memory leak in gz_compress() and add NULL check.
Mika Lindqvist [Sat, 3 Oct 2020 23:52:56 +0000 (02:52 +0300)] 
Fix memory leak in gz_compress() and add NULL check.

4 years agoFix memory leak in gz_uncompress().
Mika Lindqvist [Sat, 3 Oct 2020 23:05:05 +0000 (02:05 +0300)] 
Fix memory leak in gz_uncompress().

4 years agoFixed dereference of possibly null head variable in test_deflate_set_header.
Nathan Moinvaziri [Mon, 28 Sep 2020 23:43:50 +0000 (16:43 -0700)] 
Fixed dereference of possibly null head variable in test_deflate_set_header.

  example.c:920:16: warning: dereference of possibly-NULL ‘head’ [CWE-690] [-Wanalyzer-possible-null-dereference]

  920 |     head->text = 1;
      |     ~~~~~~~~~~~^~~
  ‘test_deflate_set_header’: event 1
    |
    |  906 |     PREFIX(gz_header) *head = calloc(1, sizeof(PREFIX(gz_header)));
    |      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      |                               |
    |      |                               (1) this call could return NULL

4 years agoFix constness in DFLTCC code
Ilya Leoshkevich [Mon, 28 Sep 2020 20:33:02 +0000 (22:33 +0200)] 
Fix constness in DFLTCC code

Use z_const instead of const in order to fix compiler warnings.

4 years agoAdd 'diffoscope' for MacOS in pkgcheck.yml
Mika Lindqvist [Thu, 24 Sep 2020 17:19:48 +0000 (20:19 +0300)] 
Add 'diffoscope' for MacOS in pkgcheck.yml
* Disable ABI check for MacOS as the runner doesn't contain abigail

4 years agoAdd missing 'diffoscope' package to pkgcheck.yml 1.9.9-b1
Mika Lindqvist [Thu, 24 Sep 2020 14:45:09 +0000 (17:45 +0300)] 
Add missing 'diffoscope' package to pkgcheck.yml

4 years agoFix unsigned integer overflow ASAN error for align_diff in crc_folding.c.
Mika Lindqvist [Sun, 20 Sep 2020 01:25:21 +0000 (18:25 -0700)] 
Fix unsigned integer overflow ASAN error for align_diff in crc_folding.c.

  zlib-ng/arch/x86/crc_folding.c:252:31: runtime error: unsigned integer overflow: 0 - 108370614813184 cannot be represented in type 'unsigned long'

4 years agoFixed tab indentation for inffixed_tbl.h.
Nathan Moinvaziri [Sun, 20 Sep 2020 23:31:59 +0000 (16:31 -0700)] 
Fixed tab indentation for inffixed_tbl.h.

4 years agoRemove package caching for Windows since we no longer downgrade to MinGW 7.
Nathan Moinvaziri [Sun, 20 Sep 2020 23:02:38 +0000 (16:02 -0700)] 
Remove package caching for Windows since we no longer downgrade to MinGW 7.

4 years agoAdded option to normalize line-endings in CMake run-and-compare script.
Nathan Moinvaziri [Sun, 20 Sep 2020 23:01:03 +0000 (16:01 -0700)] 
Added option to normalize line-endings in CMake run-and-compare script.

4 years agoMove tests closer to add_executable in CMake to make them easier to find.
Nathan Moinvaziri [Sun, 20 Sep 2020 20:32:13 +0000 (13:32 -0700)] 
Move tests closer to add_executable in CMake to make them easier to find.

4 years agoFixed cmake script directory for out of source builds.
Nathan Moinvaziri [Sun, 20 Sep 2020 19:54:20 +0000 (12:54 -0700)] 
Fixed cmake script directory for out of source builds.

4 years agoFixed parallel test runs on macOS by always appending unique id, since with corpora...
Nathan Moinvaziri [Sun, 20 Sep 2020 17:36:19 +0000 (10:36 -0700)] 
Fixed parallel test runs on macOS by always appending unique id, since with corpora repository, multiple tests can have the same output name.

4 years agoIgnore hidden test files with ctest on macOS.
Nathan Moinvaziri [Sun, 20 Sep 2020 17:13:41 +0000 (10:13 -0700)] 
Ignore hidden test files with ctest on macOS.

4 years agoUse latest stable version of codecov rather that git repo.
Nathan Moinvaziri [Sun, 20 Sep 2020 02:55:46 +0000 (19:55 -0700)] 
Use latest stable version of codecov rather that git repo.

4 years agoCheckout corpora into a separate directory to prevent overwriting.
Nathan Moinvaziri [Sat, 19 Sep 2020 23:15:41 +0000 (16:15 -0700)] 
Checkout corpora into a separate directory to prevent overwriting.

(cherry picked from commit b25c7202afdbd8e4270908c65598464f31063d51)

4 years agoAdd checks to cmake scripts to see if input files exist.
Nathan Moinvaziri [Sat, 19 Sep 2020 23:04:58 +0000 (16:04 -0700)] 
Add checks to cmake scripts to see if input files exist.

4 years agoTurn off compare and gzip verify in GH-536 tests due to switchlevels.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:43:42 +0000 (18:43 -0700)] 
Turn off compare and gzip verify in GH-536 tests due to switchlevels.

4 years agoAdd ability to turn off compare step in test-compare script.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:42:27 +0000 (18:42 -0700)] 
Add ability to turn off compare step in test-compare script.

4 years agoCheck if input variables are defined in cmake scripts.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:41:45 +0000 (18:41 -0700)] 
Check if input variables are defined in cmake scripts.

4 years agoCheck exit code from execute_process in run-and-compare cmake script.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:39:02 +0000 (18:39 -0700)] 
Check exit code from execute_process in run-and-compare cmake script.

4 years agoRemoved extra whitespace in CMakeLists.txt.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:13:28 +0000 (18:13 -0700)] 
Removed extra whitespace in CMakeLists.txt.

4 years agoRemove exit code 1 from SUCCESS_EXIT for normal compression tests.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:10:03 +0000 (18:10 -0700)] 
Remove exit code 1 from SUCCESS_EXIT for normal compression tests.

4 years agoFixed passing fixed/filtered arguments in TEST_CONFIGS.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:08:49 +0000 (18:08 -0700)] 
Fixed passing fixed/filtered arguments in TEST_CONFIGS.

4 years agoCleanup temporary files before fatal error in test-compress cmake script.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:04:30 +0000 (18:04 -0700)] 
Cleanup temporary files before fatal error in test-compress cmake script.

4 years agoCheck exit code from execute_process in test-compare cmake script.
Nathan Moinvaziri [Sat, 19 Sep 2020 01:03:38 +0000 (18:03 -0700)] 
Check exit code from execute_process in test-compare cmake script.

4 years agoFixed don't run tests against temporary files.
Nathan Moinvaziri [Sat, 19 Sep 2020 00:52:43 +0000 (17:52 -0700)] 
Fixed don't run tests against temporary files.

4 years agoFixed compression args for GH-361 unit test.
Nathan Moinvaziri [Thu, 17 Sep 2020 02:30:59 +0000 (19:30 -0700)] 
Fixed compression args for GH-361 unit test.

4 years agoRemove NIL preprocessor macro which isn't consistently enforced.
Nathan Moinvaziri [Sun, 20 Sep 2020 17:51:05 +0000 (10:51 -0700)] 
Remove NIL preprocessor macro which isn't consistently enforced.

4 years agoFixed deference null return value in gz_uncompress (CID 301524)
Nathan Moinvaziri [Mon, 21 Sep 2020 03:44:55 +0000 (20:44 -0700)] 
Fixed deference null return value in gz_uncompress (CID 301524)

4 years agoRemove unused F_OPEN preprocessor macro.
Nathan Moinvaziri [Sun, 20 Sep 2020 01:50:10 +0000 (18:50 -0700)] 
Remove unused F_OPEN preprocessor macro.

4 years agoRemove gcov-7 install since warnings on gcov-8 no longer occur in Windows CI.
Nathan Moinvaziri [Sat, 19 Sep 2020 23:27:54 +0000 (16:27 -0700)] 
Remove gcov-7 install since warnings on gcov-8 no longer occur in Windows CI.

4 years agoRemove chunkmemset_3 and chunkmemset_6 on ARM/AArch64 as they need 3 chunks...
Mika Lindqvist [Mon, 14 Sep 2020 15:40:35 +0000 (18:40 +0300)] 
Remove chunkmemset_3 and chunkmemset_6 on ARM/AArch64 as they need 3 chunks...
* Don't unroll distances smaller than chunk size.

4 years agoAdd missing z_const to fuzzers.
Mika Lindqvist [Mon, 14 Sep 2020 19:13:09 +0000 (22:13 +0300)] 
Add missing z_const to fuzzers.

4 years agoFixed match_byte casting warning in compare256_unaligned_64_static.
Nathan Moinvaziri [Mon, 14 Sep 2020 05:12:40 +0000 (22:12 -0700)] 
Fixed match_byte casting warning in compare256_unaligned_64_static.

  compare258.c(158,36): warning C4244: 'return': conversion from 'uint64_t' to 'uint32_t', possible loss of data

4 years agoMove gzclose() to gzlib.c. Modern linkers should be smart enough to link it in only...
Nathan Moinvaziri [Mon, 14 Sep 2020 04:58:57 +0000 (21:58 -0700)] 
Move gzclose() to gzlib.c. Modern linkers should be smart enough to link it in only if it is used.

4 years agoOptionally include gzguts.h with WITH_GZFILEOP flag.
Nathan Moinvaziri [Mon, 14 Sep 2020 04:16:36 +0000 (21:16 -0700)] 
Optionally include gzguts.h with WITH_GZFILEOP flag.

4 years agoAdded ubuntu mingw cross-compile CI instances to cmake GHA.
Nathan Moinvaziri [Sun, 13 Sep 2020 04:08:00 +0000 (21:08 -0700)] 
Added ubuntu mingw cross-compile CI instances to cmake GHA.

4 years agoFixed buf resource leak in gz_compress when USE_MMAP is defined. (CID 298965)
Nathan Moinvaziri [Sun, 13 Sep 2020 04:20:36 +0000 (21:20 -0700)] 
Fixed buf resource leak in gz_compress when USE_MMAP is defined. (CID 298965)

4 years agoAllocate gzlib/gzread/gzwrite structs and in/out buffers using zng_alloc
Hans Kristian Rosbach [Sat, 12 Sep 2020 21:18:13 +0000 (23:18 +0200)] 
Allocate gzlib/gzread/gzwrite structs and in/out buffers using zng_alloc
instead of malloc, this also enforces data alignment.

4 years agoIncrease zng_alloc alignment to 64-bytes for non-MacOS platforms.
Hans Kristian Rosbach [Sat, 12 Sep 2020 20:55:02 +0000 (22:55 +0200)] 
Increase zng_alloc alignment to 64-bytes for non-MacOS platforms.

4 years agoImprove malloc.h handling in zutil.h
Hans Kristian Rosbach [Sat, 12 Sep 2020 18:24:42 +0000 (20:24 +0200)] 
Improve malloc.h handling in zutil.h

4 years agoSimplify zng_calloc and zng_cfree.
Hans Kristian Rosbach [Sat, 12 Sep 2020 17:54:38 +0000 (19:54 +0200)] 
Simplify zng_calloc and zng_cfree.
Make new static functions zng_alloc and zng_free available to other parts of the code.
Always request aligned allocations, even if UNALIGNED_OK is set.

4 years agoMake it possible to disable UNALIGNED[64]_OK in cmake.
Hans Kristian Rosbach [Fri, 11 Sep 2020 19:48:46 +0000 (21:48 +0200)] 
Make it possible to disable UNALIGNED[64]_OK in cmake.
Enable testing with -O3 and unaligned reads disabled.

4 years agoRemove some of the references to the unreleased zlib 1.2.12
Hans Kristian Rosbach [Sat, 12 Sep 2020 13:28:58 +0000 (15:28 +0200)] 
Remove some of the references to the unreleased zlib 1.2.12

4 years agoAdd CI testing of NOT_TWEAK_COMPILER
Hans Kristian Rosbach [Sat, 12 Sep 2020 10:26:22 +0000 (12:26 +0200)] 
Add CI testing of NOT_TWEAK_COMPILER

4 years agoImprove coverage data accuracy
Hans Kristian Rosbach [Sat, 12 Sep 2020 12:28:25 +0000 (14:28 +0200)] 
Improve coverage data accuracy

4 years agoEnable WITH_GZFILEOP by default in nmake Makefiles.
Mika Lindqvist [Sat, 12 Sep 2020 15:22:36 +0000 (18:22 +0300)] 
Enable WITH_GZFILEOP by default in nmake Makefiles.

4 years agoAdd support for ZLIB_COMPÅT in nmake Makefiles for ARM/AArch64.
Mika Lindqvist [Fri, 11 Sep 2020 13:25:56 +0000 (16:25 +0300)] 
Add support for ZLIB_COMPÅT in nmake Makefiles for ARM/AArch64.

4 years agoFixed description for INSTALL_UTILS in README.md.
Nathan Moinvaziri [Sat, 12 Sep 2020 21:31:40 +0000 (14:31 -0700)] 
Fixed description for INSTALL_UTILS in README.md.

4 years agoVarious small changes to README.md
Hans Kristian Rosbach [Thu, 10 Sep 2020 15:19:39 +0000 (17:19 +0200)] 
Various small changes to README.md

4 years agoReorder "Features" block in README.md
Hans Kristian Rosbach [Thu, 10 Sep 2020 15:09:24 +0000 (17:09 +0200)] 
Reorder "Features" block in README.md

4 years agoAdded AVX support to chunkset functions.
Nathan Moinvaziri [Mon, 29 Jun 2020 03:00:01 +0000 (20:00 -0700)] 
Added AVX support to chunkset functions.

4 years agoUpdate CI configs to account for gzfileops being on by default.
Hans Kristian Rosbach [Wed, 9 Sep 2020 09:43:31 +0000 (11:43 +0200)] 
Update CI configs to account for gzfileops being on by default.

4 years agoEnable gzfileops by default when compiling using Cmake or configure.
Hans Kristian Rosbach [Sun, 6 Sep 2020 14:34:01 +0000 (16:34 +0200)] 
Enable gzfileops by default when compiling using Cmake or configure.

4 years agoRemove FORCE_STATIC and FORCE_STORED
Hans Kristian Rosbach [Wed, 9 Sep 2020 09:21:49 +0000 (11:21 +0200)] 
Remove FORCE_STATIC and FORCE_STORED

4 years agoRename variable to correctly indicate register usage,
Hans Kristian Rosbach [Sun, 6 Sep 2020 15:10:42 +0000 (17:10 +0200)] 
Rename variable to correctly indicate register usage,
YMM (256bit) instead of ZMM (512bit) register usage.

4 years agotest/abicheck.md: document care and feeding of abicheck.sh
Dan Kegel [Mon, 31 Aug 2020 16:37:40 +0000 (09:37 -0700)] 
test/abicheck.md: document care and feeding of abicheck.sh

4 years agotest/abicheck.sh: new script to verify abi compatibility with older versions
Dan Kegel [Thu, 16 Jul 2020 16:59:52 +0000 (09:59 -0700)] 
test/abicheck.sh: new script to verify abi compatibility with older versions

Verifies that zlib-ng's ABI has not changed since the reference commit
(indicated by variables ABI_URL and ABI_COMMIT in the script).
If --zlib-compat is given, the reference commit is zlib's 1.2.11;
otherwise, it's zlib-ng's 1d2504ddc489 (for now).

Ignores new symbols entirely, as they probably don't break backwards compatibility.

Ignores warnings listed in test/abi/ignore, currently, just those related to internal_state or z_stream*.

If --refresh is given, actually checks out the reference commit,
builds it, and stores its ABI description into an .abi file;
otherwise just uses the .abi file saved in git for that CHOST.
(--refresh_if is similar, but only does the above if the file
is not present.)

Fixes https://github.com/zlib-ng/zlib-ng/issues/699

Known issues:
- pkgcheck.yml skips -m32 abicheck failures loudly until #705 is fixed
- although abicheck.sh supports -m32 (if in both CFLAGS and LDFLAGS), it doesn't yet support -32 in CONFIGURE_ARGS.
- only includes a few abi definitions; the rest can be added in a followon commit (see --refresh).

4 years agoClean up if blocks in deflate.c
Hans Kristian Rosbach [Sat, 29 Aug 2020 22:44:25 +0000 (00:44 +0200)] 
Clean up if blocks in deflate.c

4 years agolongest_match optimization
Hans Kristian Rosbach [Sat, 29 Aug 2020 16:58:23 +0000 (18:58 +0200)] 
longest_match optimization