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
Is it possible to replace madler zlib completely with zlib-ng-compat? #1572
Comments
The obvious is that some existing bad code needs to be fixed before zlib can be replaced with zlib-ng... The long-term goal is to update everything to work with compatibility turned off. There is small but significant chance that switching to zlib-ng can reveal corner cases where it doesn't produce valid output. |
@mtl1979 What bad code are you talking about exactly? @ljavorsk There is AFAIK currently only one known bug related to using our zlib-compat mode, and it does produce invalid output. The culprit is These problems should be few however. |
Just to be clear, if something breaks, then that would be a bug. But it might be a bug in zlib-ng or it might be a bug in how an application (mis)uses the zlib api. |
My main concern is if an application overrides part of zlib functions with its own to overcome limitations of zlib... This might break for example align restrictions of zlib-ng. The other issue is passing too small buffer to zlib-ng functions, which can cause buffer overflow. I know some projects have unit tests, but those are run only during building, not when just running the resulting binary. |
Of course, we will have to rebuild all of the packages that depend on zlib, so hopefully some tests will stop us if it breaks the package. Thanks for the insights guys, feel free to raise any concerns, it will help us a lot. |
You may consider compiling with |
To follow |
Since this indeed did happen, I think it can probably be closed now! |
Yes, we indeed transitioned to zlib-ng in Fedora 40 [1]. I almost forgot about this thread. Closing it as resolved. |
Hi,
We're in the middle of the discussion about replacing the "classic" zlib with the zlib-ng (built with the ZLIB_COMPAT=ON flag) in Fedora.
There are a lot of concerns and so I wanted to reach out to you, as you could help us answer some of them. There were a lot of comments already in the fedora-devel thread.
However, do you think that the compat version of zlib-ng could really fully replace the madler/zlib package? Are there any worries from your side against doing it?
Please let me know anything you think is relevant regarding this topic.
The text was updated successfully, but these errors were encountered: