summaryrefslogtreecommitdiff
path: root/contrib/apps/httpserver
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-08-20 09:58:35 -0600
committerTom Rini <[email protected]>2026-08-20 12:15:24 -0600
commita08e99d33ff3dc2b35e208c05e3f3f324a20b87d (patch)
tree4c877b7ba3d1d6aad3c671bcef975c74deecd03a /contrib/apps/httpserver
parentacd4ac0ea62366368b99bd69a7698bbfe097c714 (diff)
parentbf219c69ec5bc5ed7838a5452cff2a690a10f9f3 (diff)
Merge patch series "gunzip: Fix spurious Z_BUF_ERROR in chunked gzwrite decompression"
Aristo Chen <[email protected]> says: The dm_test_cmd_zip_gzwrite sandbox test occasionally fails in CI with: 12582912/16777216 Error: inflate() returned -5 The chunked decompression loop added in commit 58e523fedf48 ("gunzip: Implement chunked decompression") treats Z_BUF_ERROR from inflate() as fatal. When an input chunk is exhausted at exactly the same time as the write buffer fills up, the next inflate() call is made with avail_in == 0, cannot make progress, and returns Z_BUF_ERROR. Per the zlib documentation this only means "no progress was possible" and the call should be repeated with more input, which is what the reference implementation in zlib examples/zpipe.c does. The failure needs the consumed/produced byte counts to line up with both the chunk size and the write buffer size at once, with no buffered output on the inflate side, which is why only certain random payloads trigger it. Note that the failure offset above is a multiple of the 1 MiB write buffer while gzwrite_chunk was SZ_1M + 1. Patch 1 makes gzwrite() refill the input chunk in this situation. Patch 2 adds a deterministic regression test which builds a gzip file from two stored deflate blocks by hand and aligns the chunk boundary with the write buffer boundary exactly, failing reliably without patch 1. Verified on sandbox and sandbox64: - dm_test_cmd_gzwrite_chunk_boundary fails with -5 in 20 out of 20 runs before the fix, passes 100 out of 100 runs after - dm_test_cmd_zip_gzwrite fails 17 out of 2000 runs (about 1%) before the fix, every time with the same signature as the CI flake, and passes 2000 out of 2000 runs after - dm_test_cmd_zip_unzip keeps passing Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'contrib/apps/httpserver')
0 files changed, 0 insertions, 0 deletions