Skip to content

Test failure with zlib-ng #13217

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

Closed
remicollet opened this issue Jan 22, 2024 · 5 comments
Closed

Test failure with zlib-ng #13217

remicollet opened this issue Jan 22, 2024 · 5 comments

Comments

@remicollet
Copy link
Member

Description

Fedora 40 have switched to zlib-ng
See: https://fedoraproject.org/wiki/Changes/ZlibNGTransition

Lot of tests are now failing

FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #42663 (gzinflate() try to allocate all memory with truncated $data) [ext/zlib/tests/gzinflate-bug42663.phpt]
Bug #48725 (Support for flushing in zlib stream) [ext/zlib/tests/bug48725_2.phpt]
Test gzcompress() function : basic functionality [ext/zlib/tests/gzcompress_basic1.phpt]
Test gzcompress() function : variation [ext/zlib/tests/gzcompress_variation1.phpt]
Test gzdeflate() function : basic functionality [ext/zlib/tests/gzdeflate_basic1.phpt]
Test gzdeflate() function : variation [ext/zlib/tests/gzdeflate_variation1.phpt]
Test gzencode() function : basic functionality [ext/zlib/tests/gzencode_basic1.phpt]
Test gzencode() function : variation [ext/zlib/tests/gzencode_variation1.phpt]
Bug #71417: fread() does not report zlib.inflate errors [ext/zlib/tests/bug71417.phpt]
zlib.deflate (with convert.base64-encode) [ext/zlib/tests/zlib_filter_deflate.phpt]

Ex:

TEST FAILURE: ../ext/zlib/tests/gzinflate-bug42663.diff --
     int(168890)
002- int(66743)
002+ int(66744)
     int(65535)
     
     Warning: gzinflate(): data error in %s on line %d
--
-- ../ext/zlib/tests/gzinflate-bug42663.diff result ends.

PHP Version

N/A

Operating System

No response

@remicollet
Copy link
Member Author

From a quick look, every failure is expected, and no harm
We only need to adapt/relax the tests

@jorgsowa
Copy link
Contributor

@topdev658, please don't use ChatGPT to answer. The same as in another issue: #13221 (comment)

@Girgias
Copy link
Member

Girgias commented Jan 23, 2024

@jorgsowa ChatGPT provides a good solution sometimes. Why I don't use it? Has it any problems? Or just don't like?

ChatGPT does not check its answers to know that they are factual. And it will routinely say nonsense and waste time.

So yes it has massive problems and do not use it to respond or provide "info" on this bug tracker.

remicollet added a commit to remicollet/php-src that referenced this issue Feb 29, 2024
As compressed result may be different
- drop or relax expectations on compressed data
- rely on uncompressed result of compressed data
remicollet added a commit that referenced this issue Mar 5, 2024
* PHP-8.2:
  Fix GH-13217 Test failure with zlib-ng
remicollet added a commit that referenced this issue Mar 5, 2024
* PHP-8.3:
  Fix GH-13217 Test failure with zlib-ng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@remicollet @Girgias @jorgsowa and others