JDK-8239351 : Give more meaningful InternalError messages in Deflater.c
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 8,11,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-02-18
  • Updated: 2020-10-21
  • Resolved: 2020-02-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 15
11.0.10-oracleFixed 13.0.4Fixed 15 b12Fixed
Description
When running the jtreg test java/util/zip/DeInflate.java, we currently have errors on SLES 15.1 s390x when using the system zlib (1.2.11), while the bundled zlib seems to be okay.
What's worse, the error messages are not very meaningful.

We just get:
java.lang.InternalError
at java.base/java.util.zip.Deflater.deflateBytesBytes(Native Method)
at java.base/java.util.zip.Deflater.deflate(Deflater.java:595)
at java.base/java.util.zip.Deflater.deflate(Deflater.java:474)
...
without any meaningful error text.

I would suggest to improve a bit the error messages in Deflater.c. This would lead to:

java.lang.InternalError: unknown error in checkDeflateStatus, setParams case
	at java.base/java.util.zip.Deflater.deflateBytesBytes(Native Method)
	at java.base/java.util.zip.Deflater.deflate(Deflater.java:586)
	at java.base/java.util.zip.Deflater.deflate(Deflater.java:465)

The following messages were added:

unknown error in checkSetDictionaryResult
unknown error in checkDeflateStatus, setParams case
unknown error in checkDeflateStatus
deflateReset failed
deflateEnd failed
Comments
Fix request (13u): I'd like to have it in 13u as well. Test applies cleanly.
04-06-2020

jdk11 downport request I would like to have the patch in jdk11 as well, because having better error texts is helpful there too. The patch applies cleanly.
28-02-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/2489925df497 User: mbaesken Date: 2020-02-20 08:06:01 +0000
20-02-2020