Closed AliveDevil closed 5 months ago
Changes:
IOUtil calls initInetAddressIDs(env);
in Java_sun_nio_ch_IOUtil_initIDs
from net_util.h
.
jdk/src/*/native/sun/nio/ch/IOUtil.c, with new export:
+JNIEXPORT void JNICALL initInetAddressIDs(JNIEnv *env);
jni_util.h got new export:
+/* Throw an exception by name, using a given message and the string
+ * returned by getLastErrorString to construct the detail string.
+ */
+JNIEXPORT void JNICALL
+JNU_ThrowByNameWithMessageAndLastError
+ (JNIEnv *env, const char *name, const char *message);
jdk/src/share/classes/sun/misc/SharedSecrets.java
+ public static void setJavaOISAccess(JavaOISAccess access) {
+ javaOISAccess = access;
+ }
+
+ public static JavaOISAccess getJavaOISAccess() {
+ if (javaOISAccess == null)
+ unsafe.ensureClassInitialized(ObjectInputStream.class);
+
+ return javaOISAccess;
+ }
Backport changes in jdk/src/share/classes/java/util/zip/ZipFile.java
jdk/src/share/classes/java/io/FileInputStream.java
- public native long skip(long n) throws IOException;
+ public long skip(long n) throws IOException {
+ return skip0(n);
+ }
+
+ private native long skip0(long n) throws IOException;
- public native int available() throws IOException;
+ public int available() throws IOException {
+ return available0();
+ }
+
+ private native int available0() throws IOException;
jdk/src/windows/classes/sun/nio/ch/PipeImpl.java
The ZipFile-fork looks bad going forward.
There are tests now that use runtime property jdk.util.zip.ensureTrailingSlash
.
Building fails with:
java.lang.InternalError: java.io.EOFException
at java.util.Currency$1.run(Currency.java:251)
at java.util.Currency$1.run(Currency.java:214)
at java.security.AccessController.doPrivileged(AccessController.java:308)
at java.security.AccessController.doPrivileged(AccessController.java:356)
at java.util.Currency.<clinit>(Currency.java:214)
at com.sun.tools.javac.tree.Pretty.printExpr(Pretty.java:193)
at com.sun.tools.javac.tree.Pretty.visitAssign(Pretty.java:1018)
at com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:1686)
at com.sun.tools.javac.tree.Pretty.printExpr(Pretty.java:193)
at com.sun.tools.javac.tree.Pretty.printExpr(Pretty.java:209)
at com.sun.tools.javac.tree.Pretty.printExprs(Pretty.java:223)
at com.sun.tools.javac.tree.Pretty.printExprs(Pretty.java:234)
at com.sun.tools.javac.tree.Pretty.visitAnnotation(Pretty.java:1374)
at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:2317)
at com.sun.tools.javac.tree.Pretty.printExpr(Pretty.java:193)
at com.sun.tools.javac.tree.Pretty.printExpr(Pretty.java:209)
at com.sun.tools.javac.tree.JCTree.toString(JCTree.java:410)
at java.lang.Object.toString(map.xml)
at java.lang.StringHelper.valueOf(StringHelper.java:2598)
at java.lang.String.valueOf(map.xml:415)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.sun.tools.javac.comp.Check.validateTypeAnnotation(Check.java:2745)
at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitAnnotation(Attr.java:4485)
at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:2317)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:50)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:56)
at com.sun.tools.javac.tree.TreeScanner.visitModifiers(TreeScanner.java:316)
at com.sun.tools.javac.tree.JCTree$JCModifiers.accept(JCTree.java:2343)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:50)
at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitClassDef(Attr.java:4567)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
at com.sun.tools.javac.comp.Attr.validateTypeAnnotations(Attr.java:4474)
at com.sun.tools.javac.code.TypeAnnotations$2.run(TypeAnnotations.java:142)
at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:155)
at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:130)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:480)
at com.sun.tools.javac.comp.Enter.main(Enter.java:472)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:984)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
at com.sun.tools.javac.main.Main.compile(Main.java:527)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)
at java.lang.reflect.Method.invoke(Method.java:486)
at IKVM.Runtime.Accessors.Java.Lang.Reflect.MethodAccessor.InvokeInvoke(Unknown Source)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:393)
at java.util.Currency$1.run(Currency.java:224)
at java.util.Currency$1.run(Currency.java:214)
at java.security.AccessController.doPrivileged(AccessController.java:308)
at java.security.AccessController.doPrivileged(AccessController.java:356)
at java.util.Currency.<clinit>(Currency.java:214)
at java.util.Currency.getInstance(Currency.java:413)
at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:638)
at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:114)
at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProviderImpl.java:85)
at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:180)
at java.util.Formatter.getZero(Formatter.java:2283)
at java.util.Formatter.<init>(Formatter.java:1892)
at java.util.Formatter.<init>(Formatter.java:1915)
at java.lang.StringHelper.format(StringHelper.java:2544)
at java.lang.String.format(map.xml:882)
at com.sun.tools.javac.util.Convert.quote(Convert.java:262)
at com.sun.tools.javac.util.Convert.quote(Convert.java:240)
at com.sun.tools.javac.tree.Pretty.visitLiteral(Pretty.java:1198)
at com.sun.tools.javac.tree.JCTree$JCLiteral.accept(JCTree.java:2037)
... 42 more
Test results:
cp: cannot stat 'E:/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/oom/@debuggeeVMOptions': No such file or directory
wsl.exe \\
sh /mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/oom/OomDebugTestSetup.sh
result: Failed. Execution failed: exit code 1
/bin/bash: -c: line 1: syntax error near unexpected token `('
/bin/bash: -c: line 1: `sh /mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/EvalArraysAsList.sh The test checks if evaluation of the expression java.util.Arrays.asList(null, "a") works normally and does not throw an IllegalArgumentException.'
wsl.exe \\
sh /mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/EvalArraysAsList.sh The test checks if evaluation of the expression java.util.Arrays.asList(null, "a") works normally and does not throw an IllegalArgumentException.
/mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/RedefineAddPrivateMethod.sh: 77: runit: not found
/mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/RedefineAddPrivateMethod.sh: 78: debuggeeFailIfPresent: not found
/mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/RedefineAddPrivateMethod.sh: 79: pass: not found
wsl.exe \\
sh /mnt/e/ikvm/src/IKVM.OpenJDK.Tests/bin/Debug/net461/jdk/com/sun/jdi/RedefineAddPrivateMethod.sh
Unrecognized option: -Xbootclasspath/a:E:\\ikvm\\TestResults\\ikvm-jtreg-1c550341aa03a84b\\work\\net461_jdk\\classes\\2\\java\\lang\\invoke;E:\\ikvm\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jdk\\java\\lang\\invoke;E:\\ikvm\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jtreg\\javatest.jar;E:\\ikvm\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jtreg\\jtreg.jar
result: Error. Error invoking program `E:\ikvm\src\IKVM.OpenJDK.Tests\bin\Debug\net461\ikvm\win7-x64\bin\java': java.io.IOException: Cannot run program "E:\ikvm\src\IKVM.OpenJDK.Tests\bin\Debug\net461\ikvm\win7-x64\bin\java" (in directory "E:\ikvm\TestResults\ikvm-jtreg-1c550341aa03a84b\work\net461_jdk\scratch\2"): Illegal characters in path.
Looks like jps is an unsupported tool to list hotspot VMs on the system. We aren't going to do that without very good reason. Disable tests.
WeakReference<PrivateMLet> mletRef =
new WeakReference<PrivateMLet>(mlet);
mlet = null;
System.out.println("MXBean registered and unregistered, waiting for " +
"garbage collector to collect class loader");
for (int i = 0; i < 10000 && mletRef.get() != null; i++) {
System.gc();
Thread.sleep(1);
}
----------System.out:(11/742)----------
MXBeanLoadingTest1::run: Start
We ensure no reference is retained on MXBean class after it is unregistered. We take time to perform some little extra check of Descriptors, MBean*Info.
MXBean registered and unregistered, waiting for garbage collector to collect class loader
(ERROR) Class loader was not GC'd
java.lang.RuntimeException: (ERROR) Class loader was not GC'd
at MXBeanLoadingTest1.run(MXBeanLoadingTest1.java:259)
at MXBeanLoadingTest1.main(MXBeanLoadingTest1.java:60)
at java.lang.reflect.Method.invoke(Method.java:486)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.lang.Thread.run(Thread.java:963)
class java.lang.RuntimeException==>(ERROR) Class loader was not GC'd
----------System.err:(14/833)----------
java.lang.RuntimeException: java.lang.RuntimeException: (ERROR) Class loader was not GC'd
at MXBeanLoadingTest1.run(MXBeanLoadingTest1.java:292)
at MXBeanLoadingTest1.main(MXBeanLoadingTest1.java:60)
at java.lang.reflect.Method.invoke(Method.java:486)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.lang.Thread.run(Thread.java:963)
Caused by: java.lang.RuntimeException: (ERROR) Class loader was not GC'd
at MXBeanLoadingTest1.run(MXBeanLoadingTest1.java:259)
... 4 more
JavaTest Message: Test threw exception: java.lang.RuntimeException: java.lang.RuntimeException: (ERROR) Class loader was not GC'd
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: java.lang.RuntimeException: (ERROR) Class loader was not GC'd
java.lang.NullPointerException
at IKVM.Java.Externs.java.lang.Class.forName0(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:299)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(AccessController.java:308)
at java.security.AccessController.doPrivileged(AccessController.java:356)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1349)
at AccessibleJListChildNPETest.main(AccessibleJListChildNPETest.java:63)
at java.lang.reflect.Method.invoke(Method.java:486)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.lang.Thread.run(Thread.java:963)
JavaTest Message: Test threw exception: java.lang.NullPointerException
JavaTest Message: shutting down test
----------rerun:(23/2858)*----------
cd 'E:\\ikvm-jdk8u152\\TestResults\\ikvm-jtreg-8c0d93ed54967f7d\\work\\net461_jdk\\scratch\\1' && \\
PATH='C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\RedHat\\java-1.8.0-openjdk-1.8.0.362-1\\bin;C:\\Program Files\\RedHat\\java-1.8.0-openjdk-1.8.0.362-1\\jre\\bin;C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\;C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\dotnet\\;C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\user\\.dotnet\\tools' \\
SystemDrive=C: \\
SystemRoot='C:\\Windows' \\
TEMP='C:\\Users\\user\\AppData\\Local\\Temp' \\
TMP='C:\\Users\\user\\AppData\\Local\\Temp' \\
windir='C:\\Windows' \\
CLASSPATH='E:\\ikvm-jdk8u152\\TestResults\\ikvm-jtreg-8c0d93ed54967f7d\\work\\net461_jdk\\classes\\1\\javax\\net\\ssl\\TLSv12;E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jdk\\javax\\net\\ssl\\TLSv12;E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jtreg\\javatest.jar;E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jtreg\\jtreg.jar' \\
'E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\ikvm\\win7-x64\\bin\\java' \\
-Dtest.class.path.prefix='E:\\ikvm-jdk8u152\\TestResults\\ikvm-jtreg-8c0d93ed54967f7d\\work\\net461_jdk\\classes\\1\\javax\\net\\ssl\\TLSv12;E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jdk\\javax\\net\\ssl\\TLSv12' \\
-Dtest.src='E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jdk\\javax\\net\\ssl\\TLSv12' \\
-Dtest.src.path='E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jdk\\javax\\net\\ssl\\TLSv12' \\
-Dtest.classes='E:\\ikvm-jdk8u152\\TestResults\\ikvm-jtreg-8c0d93ed54967f7d\\work\\net461_jdk\\classes\\1\\javax\\net\\ssl\\TLSv12' \\
-Dtest.class.path='E:\\ikvm-jdk8u152\\TestResults\\ikvm-jtreg-8c0d93ed54967f7d\\work\\net461_jdk\\classes\\1\\javax\\net\\ssl\\TLSv12' \\
-Dtest.vm.opts= \\
-Dtest.tool.vm.opts= \\
-Dtest.compiler.opts= \\
-Dtest.java.opts= \\
-Dtest.jdk='E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\ikvm\\win7-x64' \\
-Dcompile.jdk='E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\ikvm\\win7-x64' \\
-Dtest.timeout.factor=6.0 \\
-Dtest.root='E:\\ikvm-jdk8u152\\src\\IKVM.OpenJDK.Tests\\bin\\Debug\\net461\\jdk' \\
com.sun.javatest.regtest.agent.MainWrapper 'E:\\ikvm-jdk8u152\\TestResults\\ikvm-jtreg-8c0d93ed54967f7d\\work\\net461_jdk\\javax\\net\\ssl\\TLSv12\\SignatureAlgorithms.d\\main.0.jta' PKIX "SHA-224,SHA-256" TLS_DHE_DSS_WITH_AES_128_CBC_SHA
result: Error. Error invoking program `E:\ikvm-jdk8u152\src\IKVM.OpenJDK.Tests\bin\Debug\net461\ikvm\win7-x64\bin\java': java.io.IOException: Cannot run program "E:\ikvm-jdk8u152\src\IKVM.OpenJDK.Tests\bin\Debug\net461\ikvm\win7-x64\bin\java" (in directory "E:\ikvm-jdk8u152\TestResults\ikvm-jtreg-8c0d93ed54967f7d\work\net461_jdk\scratch\1"): Illegal characters in path.
Noticable changes: 8u152: Newer Build Toolchain for OpenJDK (builds with gcc-7 (tested)) 8u112: JTReg-compatibility
java.io.FileDescriptor
for changes. Numerous local changes.sun.misc.VM
for changes.sun.nio.ch
for changes. Large fork.sun.nio.fs
for changes. Large fork.sun.reflect
for changesTargeting 8u152-b16 (original GA-release, not b34 which is a bundled patch release).