Changes buffer size for writing header in fwrite#5049
Conversation
Actually, buffer size for writing header only uses headerLen. With this commit, buffer size for writing header uses headerLen only when the size is bigger than using the buffer size parameter (buffMB). Resolves #5048
acbe053 to
7d9b38f
Compare
|
Many thanks! If possible it would be great if you could raise an issue to the OpenBSD team (maybe they are not aware it is using a 16-year version of zlib) and then we can place a link to that question/report in our news item so that readers of our news can be reassured that it has been reported to OpenBSD team. |
|
Thanks Matt to merge this PR without waiting my answer. I confirm this PR fixes the problem. I will send a issue to OpenBSD team. |
|
Here is report on openbsd-misc list: |
|
Thanks @philippechataignon. But if I were them I would be unclear reading that. What I had in mind was more like: |
|
It's an old version but they applied regularly patches as you can see here : https://cvsweb.openbsd.org/src/lib/libz/?sortby=date#dirlist : it's not a real 1.2.3. For example of asking a new zlib version, you can see this answer : https://marc.info/?l=openbsd-misc&m=141066380405272&w=2. OpenBSD system is very conservative and I'm not sure they will jump to 1.2.11. |
It's sort of a fork of zlib then but with no new name?
The subject was "no zlib from zlib.net" (where the word 'no' is the first word) so after reading that exchange a few times I suspect the responder may have been frustrated by the unhelpful and incorrect subject and the comparison made to Ubuntu and then responded bluntly to correct the incorrect 'no' and the reply ended up along the lines of "we in fact have v1.2.3 from 2005". I guess that was frustrating to the OP because they knew that and it was 2014. When busy people in a dev team scan a mailing list, each subject conveys how much time each OP took to make a good subject and therefore how much respect each OP has for the responders they are seeking a reply from.
Essentially, I have complained about OpenBSD in our news item, and that's what I'm concerned about. I want to get the messaging right before release and get the facts right. It currently reads as follows :
I'm glad I used the word 'apparently' as indeed it seems 'it's not really 1.2.3'. We'll continue to revise this news item before release. It is frustrating to me that we are spending time fixing a problem caused by a new release of an operating system (OpenBSD 6.9 was released last month May 2021) that uses a 16 year old version of a wildly popular and depended on library such as zlib. I have hope that it was either not intentional, there's a good reason such as maybe zlib's license changed after 1.2.3, or there's something else I didn't know I didn't know. Here's my attempt then : https://marc.info/?l=openbsd-misc&m=162455479311886&w=1
|
|
This looks like it had been a protocol / format change, though one which apparently was obscure enough that many people did not notice. But that makes it worth careful inspection, and the change in the compressed representation should be well documented. |
This PR is an attempt to Resolve #5048.
Actually, buffer size for writing header only uses headerLen. headerLen is computed accurately and deflateBound returns a buffer size witch guarantees an one pass compression. But that's not true with OpenBSD which uses on old zlib version.
Here, we use by default the buffer size used for rows from the buffer size parameter (buffMB) and, if we have a very long header, we use headerLen.