diff --git a/deps/zlib/crc32.c b/deps/zlib/crc32.c index 1e1a57519cbda6..cf8579f30aa707 100644 --- a/deps/zlib/crc32.c +++ b/deps/zlib/crc32.c @@ -792,8 +792,8 @@ unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, words = (z_word_t const *)buf; /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianess at execution time. If the - compiler knows what the endianess will be, it can optimize out the + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the check and the unused branch. */ endian = 1; if (*(unsigned char *)&endian) { diff --git a/deps/zlib/deflate.c b/deps/zlib/deflate.c index 173ce596be582e..d1611cce058931 100644 --- a/deps/zlib/deflate.c +++ b/deps/zlib/deflate.c @@ -168,6 +168,11 @@ local const config configuration_table[10] = { * bit values at the expense of memory usage). We slide even when level == 0 to * keep the hash table consistent if we switch back to level > 0 later. */ +#if defined(__has_feature) +# if __has_feature(memory_sanitizer) + __attribute__((no_sanitize("memory"))) +# endif +#endif local void slide_hash(deflate_state *s) { #if defined(DEFLATE_SLIDE_HASH_SSE2) || defined(DEFLATE_SLIDE_HASH_NEON) slide_hash_simd(s->head, s->prev, s->w_size, s->hash_size); diff --git a/deps/zlib/gzguts.h b/deps/zlib/gzguts.h index e23f831f531bb1..f9375047e8c58f 100644 --- a/deps/zlib/gzguts.h +++ b/deps/zlib/gzguts.h @@ -7,9 +7,8 @@ # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif +# undef _FILE_OFFSET_BITS +# undef _TIME_BITS #endif #ifdef HAVE_HIDDEN diff --git a/deps/zlib/gzlib.c b/deps/zlib/gzlib.c index 9810e3553e0263..0d3ebf8d297e57 100644 --- a/deps/zlib/gzlib.c +++ b/deps/zlib/gzlib.c @@ -311,8 +311,8 @@ int ZEXPORT gzbuffer(gzFile file, unsigned size) { /* check and set requested size */ if ((size << 1) < size) return -1; /* need to be able to double it */ - if (size < 2) - size = 2; /* need two bytes to check magic header */ + if (size < 8) + size = 8; /* needed to behave well with flushing */ state->want = size; return 0; } diff --git a/deps/zlib/zlib.h b/deps/zlib/zlib.h index 014331fc8dc33f..cd7b165cc863e9 100644 --- a/deps/zlib/zlib.h +++ b/deps/zlib/zlib.h @@ -230,7 +230,7 @@ ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. + allocation functions. total_in, total_out, adler, and msg are initialized. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all @@ -382,7 +382,8 @@ ZEXTERN int ZEXPORT inflateInit(z_streamp strm); read or consumed. The allocation of a sliding window will be deferred to the first call of inflate (if the decompression does not complete on the first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the @@ -695,7 +696,7 @@ ZEXTERN int ZEXPORT deflateReset(z_streamp strm); This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate the internal compression state. The stream will leave the compression level and any other attributes that may have been - set unchanged. + set unchanged. total_in, total_out, adler, and msg are initialized. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). @@ -820,8 +821,9 @@ ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, gzip file" and give up. If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. @@ -960,6 +962,7 @@ ZEXTERN int ZEXPORT inflateReset(z_streamp strm); This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). diff --git a/doc/contributing/maintaining/maintaining-dependencies.md b/doc/contributing/maintaining/maintaining-dependencies.md index 9500424a783b18..a351bc473307ca 100644 --- a/doc/contributing/maintaining/maintaining-dependencies.md +++ b/doc/contributing/maintaining/maintaining-dependencies.md @@ -31,7 +31,7 @@ This a list of all the dependencies: * [undici 5.27.2][] * [uvwasi 0.0.19][] * [V8 11.3.244.8][] -* [zlib 1.2.13.1-motley-dfc48fc][] +* [zlib 1.2.13.1-motley-5daffc7][] Any code which meets one or more of these conditions should be managed as a dependency: @@ -311,7 +311,7 @@ See [maintaining-web-assembly][] for more informations. high-performance JavaScript and WebAssembly engine, written in C++. See [maintaining-V8][] for more informations. -### zlib 1.2.13.1-motley-dfc48fc +### zlib 1.2.13.1-motley-5daffc7 The [zlib](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/zlib) dependency lossless data-compression library, @@ -349,4 +349,4 @@ performance improvements not currently available in standard zlib. [update-openssl-action]: ../../../.github/workflows/update-openssl.yml [uvwasi 0.0.19]: #uvwasi-0019 [v8 11.3.244.8]: #v8-1132448 -[zlib 1.2.13.1-motley-dfc48fc]: #zlib-12131-motley-dfc48fc +[zlib 1.2.13.1-motley-5daffc7]: #zlib-12131-motley-5daffc7 diff --git a/src/zlib_version.h b/src/zlib_version.h index 02390a4afd0ec5..cb48f4e9a02ad4 100644 --- a/src/zlib_version.h +++ b/src/zlib_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-zlib.sh #ifndef SRC_ZLIB_VERSION_H_ #define SRC_ZLIB_VERSION_H_ -#define ZLIB_VERSION "1.2.13.1-motley-dfc48fc" +#define ZLIB_VERSION "1.2.13.1-motley-5daffc7" #endif // SRC_ZLIB_VERSION_H_