RFR: 8299748: java/util/zip/Deinflate.java failing on s390x
Amit Kumar
duke at openjdk.org
Thu Feb 16 05:35:26 UTC 2023
On Wed, 15 Feb 2023 08:15:28 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>I assume you can quickly check which loop, I suspect it's the deflate loop based of the previous comments/experiments.
Both of loop's are inf-loops with this change. If somehow I terminate the first loop then second goes into infinite state.
>Your initial proposal was to increase the size of out1 but I can't see any cases in this test where the deflate fills out1 completely.
Alan Here are some stats (after increasing the `out1` size with a factor of 32), where I was looking for `what size of array do we need to store compressed data` and `array capacity we have`:
Capacity with out1 * 32: 557056 <-> Buffer we need 552981
Capacity with out1 * 32: 557056 <-> Buffer we need 552975
Initial size of `out1`: 525312
As you can see, the size of out1 is insufficient for the s390x. That's why I proposed the fix to increase the buffer size.
Because the compressor is not deterministic, I don't want to be byte-perfect, so I changed the multiplier to `64` to leave some extra space here.
-------------
PR: https://git.openjdk.org/jdk/pull/12283
More information about the core-libs-dev
mailing list