RFR: [XS] 8228650: runtime/SharedArchiveFile/CheckDefaultArchiveFile.java test fails on AIX
Baesken, Matthias
matthias.baesken at sap.com
Fri Jul 26 13:25:27 UTC 2019
Hello, please review this small CDS test related fix .
Currently the runtime/SharedArchiveFile/CheckDefaultArchiveFile.java test fails on AIX .
It runs into this NPE :
java.lang.NullPointerException
at java.base/sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:75)
at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
at java.base/java.nio.file.Path.of(Path.java:147)
at java.base/java.nio.file.Paths.get(Paths.java:69)
at CheckDefaultArchiveFile.main(CheckDefaultArchiveFile.java:51)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:830)
Reason is that the path to the classes.jsa is null, which is correct on a non CDS platform (like AIX).
See the coding :
jdk/src/hotspot/share/runtime/arguments.hpp :
static char* get_default_shared_archive_path() NOT_CDS_RETURN_(NULL);
jdk/src/hotspot/share/runtime/arguments.cpp :
3477 #if INCLUDE_CDS
3478 // Sharing support
3479 // Construct the path to the archive
3480 char* Arguments::get_default_shared_archive_path() {
However the test does not handle this case correctly.
AIX has CDS disabled, it is currently not supported on the platform .
jdk/make/autoconf/hotspot.m4 :
495 # Disable CDS on AIX.
496 if test "x$OPENJDK_TARGET_OS" = "xaix"; then
497 ENABLE_CDS="false"
498 if test "x$enable_cds" = "xyes"; then
499 AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
500 fi
501 fi
Bug/webrev :
https://bugs.openjdk.java.net/browse/JDK-8228650
http://cr.openjdk.java.net/~mbaesken/webrevs/8228650.0/
Thanks, Matthias
More information about the hotspot-dev
mailing list