RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v2]

Amit Kumar amitkumar at openjdk.org
Mon Mar 6 11:54:16 UTC 2023


On Thu, 2 Feb 2023 08:27:55 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> DeInflate.java test fails on s390x platform because size for out1 array which is responsible for storing the compressed data is insufficient. And being unable to write whole compressed data on array, on s390 whole data can't be recovered after compression. So this fix increase Array size (for s390).
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   change acc to Alan comments

Hi Jaikiran, Thank you so much for your inputs :-) 

>While we are at it, just for the sake of testing, undo the changes I suggested in my last reply and use the current PR's code (afresh) and print out the length of the final deflated content, something like:
>```
>out1 = baos.toByteArray();
>System.out.println("Deflated length is: " + out1.length + " for input of length: " + len);
>```
>I'm curious how large the deflated content would be.


I guess this is what you want to see ?


> `initial size: 525312`
> 
> error I'm facing is on level 1 not on -1.
> 
> ```
> level:1, strategy: 0, dowrap: false
>   required size: 553018  <- there is an issue
>   required size: 283432
>   required size: 526225  <- there is an issue
>   required size: 301127
>   required size: 409196
> level:1, strategy: 0, dowrap: true
>   required size: 553012  <- there is an issue
>   required size: 44541
>   required size: 414324
>   required size: 289230
>   required size: 176785
> ```
> 
> this is result for executing test case 2nd time:
> 
> ```
> level:1, strategy: 0, dowrap: false
>   required size: 552979  <- there is an issue
>   required size: 549979  <- there is an issue
>   required size: 49738
>   required size: 116661
>   required size: 439574
> level:1, strategy: 0, dowrap: true
>   required size: 552973  <- there is an issue
>   required size: 466730
>   required size: 509795
>   required size: 94907
>   required size: 476173
> ```
> 
> All other levels are okay, this could be explained by Ilya's patch. What states that `hardware` compression will be used on level 1 and `software` compression will be used on all other levels.


>Capacity with out1 * 32: 557056 <-> Buffer we need 552981
>Capacity with out1 * 32: 557056 <-> Buffer we need 552975
>Initial size of out1: 525312

-------------

PR: https://git.openjdk.org/jdk/pull/12283


More information about the core-libs-dev mailing list