Skip to content

Upgrade ZLIB to v1.3.2#17

Merged
jviotti merged 1 commit intomainfrom
zlib-1-3-2
Feb 17, 2026
Merged

Upgrade ZLIB to v1.3.2#17
jviotti merged 1 commit intomainfrom
zlib-1-3-2

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 17, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode
Copy link

augmentcode bot commented Feb 17, 2026

🤖 Augment PR Summary

Summary: Updates the vendored zlib dependency from v1.3.1 to v1.3.2.

Changes:

  • Bumps the zlib reference in DEPENDENCIES and refreshes the vendored source under vendor/zlib/
  • Adds new size_t-based helper APIs (e.g., compress*_z, uncompress*_z, *Bound_z) and updates existing wrappers
  • Updates CRC32 and deflate/inflate internals (table init, bounds, and header handling), plus gzip I/O behavior
  • Extends gzip read/write paths to better handle non-blocking I/O and deferred errors
  • Updates license/copyright headers and ancillary upstream files tracked/masked in vendor/zlib.mask
  • Adjusts zlib CMake integration by changing the configured template used by cmake/FindZLIB.cmake

Technical Notes: This is largely an upstream vendor refresh; the new zlib release includes API surface expansion and behavior updates that can affect consumers at compile-time (types) and runtime (gzip I/O).

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

endif()

configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zconf.h.cmakein"
configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zlibConfig.cmake.in"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure_file() is generating ${CMAKE_CURRENT_BINARY_DIR}/zlib/zconf.h from vendor/zlib/zlibConfig.cmake.in, but that input is a CMake package config template (not a zconf.h header template), so the produced/installed zconf.h will be invalid. This also means Z_HAVE_UNISTD_H is no longer reflected in the generated header, which may change platform feature detection for consumers.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 27 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="cmake/FindZLIB.cmake">

<violation number="1" location="cmake/FindZLIB.cmake:8">
P1: configure_file now uses zlibConfig.cmake.in to generate zconf.h, which will produce an invalid header and break zlib builds. Use the zconf.h.cmakein template instead.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

endif()

configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zconf.h.cmakein"
configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zlibConfig.cmake.in"
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: configure_file now uses zlibConfig.cmake.in to generate zconf.h, which will produce an invalid header and break zlib builds. Use the zconf.h.cmakein template instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmake/FindZLIB.cmake, line 8:

<comment>configure_file now uses zlibConfig.cmake.in to generate zconf.h, which will produce an invalid header and break zlib builds. Use the zconf.h.cmakein template instead.</comment>

<file context>
@@ -5,7 +5,7 @@ if(NOT ZLIB_FOUND)
   endif()
 
-  configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zconf.h.cmakein"
+  configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zlibConfig.cmake.in"
     "${CMAKE_CURRENT_BINARY_DIR}/zlib/zconf.h" @ONLY)
 
</file context>
Suggested change
configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zlibConfig.cmake.in"
configure_file("${PROJECT_SOURCE_DIR}/vendor/zlib/zconf.h.cmakein"
Fix with Cubic

@jviotti jviotti merged commit 2f46a5e into main Feb 17, 2026
13 checks passed
@jviotti jviotti deleted the zlib-1-3-2 branch February 17, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant