[12] RFR for JDK-8215123: Crash in runtime image built with jlink --compress=2

Alexey Ivanov alexey.ivanov at oracle.com
Mon Dec 10 12:32:05 UTC 2018


Hi,

Could you please review the following fix for jdk12?

bug: https://bugs.openjdk.java.net/browse/JDK-8215123
webrev: http://cr.openjdk.java.net/~aivanov/8215123/webrev.00/


The problem is that calling convention was changed on ZIP_InflateFully 
function in zip.dll. Yet it hasn't been updated in jimage.dll which uses 
this function.

It could be considered a regression from JDK-8200178 [1] and JDK-8201226 
[2]. After the first fix, ZIP_InflateFully was exported with a mangled 
name so that function could not be found in zip.dll. After the second 
fix, the function uses __cdecl; mismatched calling convention leads to 
stack corruption.

The fix is to remove JNICALL (__stdcall) from ZIP_InflateFully function 
prototype in imageDecompressor.cpp so that the calling convention is the 
same.


This issue was brought up by Ali İnce from AdoptOpenJDK:
http://mail.openjdk.java.net/pipermail/build-dev/2018-December/024300.html


Thank you in advance.

Regards,
Alexey

[1] https://bugs.openjdk.java.net/browse/JDK-8200178
[2] https://bugs.openjdk.java.net/browse/JDK-8201226


More information about the core-libs-dev mailing list