forked from madler/zlib
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] develop from madler:develop #3
Open
pull
wants to merge
266
commits into
bazelregistry:develop
Choose a base branch
from
madler:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inflateSync() is used to skip invalid deflate data, which means that the check value that was being computed is no longer useful. This commit turns off the check value computation, and furthermore allows a successful return if the compressed data terminated in a graceful manner. This commit also fixes a bug in the case that inflateSync() is used before a header is ever processed. In that case, there is no knowledge of a trailer, so the remainder is treated as raw.
Define the macro Z_ARM_CRC32 at compile time to use the ARMv8 (aarch64) crc32x and crc32b instructions. This code does not check for the presence of the crc32 instructions. Those instructions are optional for ARMv8.0, though mandatory for ARMv8.1 and later. The use of the crc32 instructions is about ten times as fast as the software braided calculation of the CRC-32. This can noticeably speed up the decompression of gzip streams.
The ARM crc32 instructions will be used only if an architecture is explicitly specified at compile time that has those instructions. For example, -march=armv8.1-a or -march=armv8-a+crc, or if the machine being compiled on has the instructions, -march=native.
Thank you Adam Richter.
The issue is that unztell64() does not return the correct value if the position in the current file (in the ZIP archive) is beyond 4 GB. The cause is that unzReadCurrentFile() does not account for pfile_in_zip_read_info->stream.total_out at line 1854 of unzip.c wrapping around (it is a 32-bit variable). So, on line 1860 uTotalOutAfter can be *less* than uTotalOutBefore, propagating the wraparound to uOutThis, which in turn is added to pfile_in_zip_read_info->total_out_64. That has the effect of subtracting 4 GB.
Also fix Makefile test target and permit added compile options.
Note intentional switch case fall throughs to avoid gcc warnings.
0xffffffffffffffffULL was causing warnings for C99 usage. The suffix for the constant is not necessary anyway, so this commit removes them.
The previous releases of zlib were not sensitive to incorrect CRC inputs with bits set above the low 32. This commit restores that behavior, so that applications with such bugs will continue to operate as before.
Not all toolchains on UNIX-style operating systems predefine "unix". For example, it's missing on NetBSD, OpenBSD/gcc, AIX, HP-UX. There is no single macro defined everywhere, but checking both "__unix__" and "__unix" should cover everything except macOS, which is already checked for using "__APPLE__". Note that case sensitivity should default to off on macOS and cygwin, so the check there is different.
In minizip's configure.ac. AC_HELP_STRING is obsolete.
minizip.pc.in would add @include@/minizip to the include path, which would permit simply #include <zip.h> to use minizip. However that conflicts with the zip.h from libzip that is put in the root include directory. This now does not add /minizip to the include path. Now when using pkg-config, #include <minizip/zip.h> must be used, where #include <zip.h> would be used for libzip. This is an incompatible change with the previous state. Users of minizip and pkg-config will need to update their code. #include <unzip.h> will need to be updated to #include <minizip/unzip.h> as well.
A library is usually expected to be built in a folder /build at its root. Whenever this repository is added as a submodule of another project and compiled, git shows all the generated files as changes. To suppress those git messages, this ignores the build folder.
This returns the number of used bits in the last byte of a stream that has just been compressed with deflate.
Though it does not matter for code correctness, clang's UBSan injects code that complains about computing a pointer from an array where the result is out-of-bounds for that array, even though the pointer is never dereferenced. Go figure. This commit avoids that possibility when computing distcode in inflateCopy().
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )