Re: [PATCH v2 0/2] gunzip: Fix spurious Z_BUF_ERROR in chunked gzwrite decompression

Tom Rini <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
On Sat, 08 Aug 2026 00:44:32 +0000, Aristo Chen via U-Boot wrote:

> 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.
> 
> [...]

Applied to u-boot/main, thanks!

[1/2] gunzip: Fix spurious Z_BUF_ERROR in chunked gzwrite decompression
      commit: 58b49a7b54bae6cf524d1c0f17a9285287b91947
[2/2] test: cmd: Add gzwrite chunk boundary regression test
      commit: bf219c69ec5bc5ed7838a5452cff2a690a10f9f3
-- 
Tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.