RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v2]
Jaikiran Pai
jpai at openjdk.org
Wed Feb 8 06:01:42 UTC 2023
On Thu, 2 Feb 2023 08:27:55 GMT, Amit Kumar <duke 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
Hello Amit, just to get a bit more details about this zlib library, would it be possible to get the zlib version and the zlib compiler flags used to build it? The crudest (but simplest) way of doing this is applying the following patch to the JDK and rebuilding the JDK and running that specific test again:
diff --git a/src/java.base/share/native/libzip/Deflater.c b/src/java.base/share/native/libzip/Deflater.c
index 1ed1994d471..951cd7a6664 100644
--- a/src/java.base/share/native/libzip/Deflater.c
+++ b/src/java.base/share/native/libzip/Deflater.c
@@ -38,10 +38,17 @@
#define DEF_MEM_LEVEL 8
+static jint logged = 0;
+
JNIEXPORT jlong JNICALL
Java_java_util_zip_Deflater_init(JNIEnv *env, jclass cls, jint level,
jint strategy, jboolean nowrap)
{
+ if (logged == 0) {
+ logged = 1;
+ fprintf(stderr, "zlib version is %s\n", zlibVersion());
+ fprintf(stderr, "zlib compiler flags are %lu\n", zlibCompileFlags());
+ }
z_stream *strm = calloc(1, sizeof(z_stream));
if (strm == 0) {
The .jtr file will then have these log messages in the System.err section. For me it is:
----------System.err:(3/66)----------
zlib version is 1.2.13
zlib compiler flags are 169
It would be interesting to see what it prints on that specific system where it is behaving differently.
-------------
PR: https://git.openjdk.org/jdk/pull/12283
More information about the core-libs-dev
mailing list