Details
-
Bug
-
Resolution: Fixed
-
P3
-
12
-
32 bit Windows
-
team
-
x86
-
windows
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8216357 | 13 | Alexey Ivanov | P3 | Resolved | Fixed | b03 |
JDK-8234762 | 11.0.7-oracle | Ravi Reddy | P3 | Resolved | Fixed | b02 |
JDK-8220440 | 11.0.4 | Alexey Ivanov | P3 | Resolved | Fixed | b01 |
Description
If one creates a Zip-compressed runtime image using jlink, java always crashes.
Steps to reproduce:
1. Create a runtime image:
images/jdk> bin/jlink --compress=2 --add-modules=java.base --output jrebase
2. Run java -version from the image:
images/jdk> jrebase/bin/java -version
Execution protection violation
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000043d, pid=14308, tid=23724
#
# JRE version: (12.0+99) (build )
# Java VM: Java HotSpot(TM) Server VM (12-sustaining+99, mixed mode, emulated-client, g1 gc, windows-x86)
# Problematic frame:
# C 0x0000043d
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\ade\work\jdk-dev\build\windows-x86-server-release\images\jdk\hs_err_pid14308.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
jimage.dll looks up ZIP_InflateFully [1][2] function from zip.dll dynamically.JDK-8201226 removed JNICALL (__stdcall) modifier from ZIP_InflateFully [3][4] to overcome __stdcall name mangling on Win32.
It stopped working sinceJDK-8200178 which removed /export options to the linker [5] because the mangled name was exported. Therefore the function ZIP_InflateFully would not be found.
When using --compress={0,1}, the resulting image does not crash.
[1] http://hg.openjdk.java.net/jdk/jdk/file/f94c7929a44b/src/java.base/share/native/libjimage/imageDecompressor.cpp#l41
[2] http://hg.openjdk.java.net/jdk/jdk/file/f94c7929a44b/src/java.base/share/native/libjimage/imageDecompressor.cpp#l85
[3] http://hg.openjdk.java.net/jdk/jdk/rev/e0af66d6e968#l6.63
[4] http://hg.openjdk.java.net/jdk/jdk/rev/e0af66d6e968#l7.43
[5] http://hg.openjdk.java.net/jdk/jdk/rev/396ea30afbd5#l2.97
Steps to reproduce:
1. Create a runtime image:
images/jdk> bin/jlink --compress=2 --add-modules=java.base --output jrebase
2. Run java -version from the image:
images/jdk> jrebase/bin/java -version
Execution protection violation
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000043d, pid=14308, tid=23724
#
# JRE version: (12.0+99) (build )
# Java VM: Java HotSpot(TM) Server VM (12-sustaining+99, mixed mode, emulated-client, g1 gc, windows-x86)
# Problematic frame:
# C 0x0000043d
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\ade\work\jdk-dev\build\windows-x86-server-release\images\jdk\hs_err_pid14308.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
jimage.dll looks up ZIP_InflateFully [1][2] function from zip.dll dynamically.
It stopped working since
When using --compress={0,1}, the resulting image does not crash.
[1] http://hg.openjdk.java.net/jdk/jdk/file/f94c7929a44b/src/java.base/share/native/libjimage/imageDecompressor.cpp#l41
[2] http://hg.openjdk.java.net/jdk/jdk/file/f94c7929a44b/src/java.base/share/native/libjimage/imageDecompressor.cpp#l85
[3] http://hg.openjdk.java.net/jdk/jdk/rev/e0af66d6e968#l6.63
[4] http://hg.openjdk.java.net/jdk/jdk/rev/e0af66d6e968#l7.43
[5] http://hg.openjdk.java.net/jdk/jdk/rev/396ea30afbd5#l2.97
Attachments
Issue Links
- backported by
-
JDK-8216357 Crash in runtime image built with jlink --compress=2
- Resolved
-
JDK-8220440 Crash in runtime image built with jlink --compress=2
- Resolved
-
JDK-8234762 Crash in runtime image built with jlink --compress=2
- Resolved
- relates to
-
JDK-8201226 missing JNIEXPORT / JNICALL at some places in function declarations/implementations
- Resolved
-
JDK-8200178 Remove mapfiles for JDK native libraries
- Resolved
- links to
(2 links to)