On Thu, 6 Aug 2026 15:52:13 GMT, Chris Plummer <[email protected]> wrote:
>> We can see following errors when we run `make test` with >> `JTREG="VALUE_CLASS_PLUGIN=true;VM_OPTIONS=--enable-preview"`: >> >> TestInstanceKlassSize >> >> stderr: [Exception in thread "main" java.lang.UnsupportedClassVersionError: >> Preview features are not enabled for jdk/test/whitebox/WhiteBox (class file >> version 72.65535). Try running with '--enable-preview' >> at java.base/java.lang.ClassLoader.findBootstrapClass(Native Method) >> at java.base/java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoa >> der.java:1244) >> at java.base/java.lang.System$1.findBootstrapClassOrNull(System.java >> :2068) >> at java.base/jdk.internal.loader.ClassLoaders$BootClassLoader.loadCl >> assOrNull(ClassLoaders.java:138) >> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( >> BuiltinClassLoader.java:639) >> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( >> BuiltinClassLoader.java:615) >> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( >> BuiltinClassLoader.java:639) >> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( >> BuiltinClassLoader.java:615) >> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Builti >> nClassLoader.java:578) >> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502) >> at TestInstanceKlassSize.<clinit>(TestInstanceKlassSize.java:65) >> ] >> exitValue = 1 >> >> java.lang.RuntimeException: Expected to get exit value of [0], exit value is >> : [1] >> at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAna >> lyzer.java:602) >> at TestInstanceKlassSize.startMeWithArgs(TestInstanceKlassSize.java: >> 100) >> at TestInstanceKlassSize.main(TestInstanceKlassSize.java:152) >> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke( >> DirectMethodHandleAccessor.java:104) >> at java.base/java.lang.reflect.Method.invoke(Method.java:583) >> at com.sun.javatest.regtest.agent.MainMethodHelper.executeModernMain >> Class(MainMethodHelper.java:55) >> at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapp >> er.java:138) >> at java.base/java.lang.Thread.run(Thread.java:1527) >> >> >> TestInstanceKlassSizeForInterface >> >> stderr: [Exception in thread "main" java.lang.UnsupportedClassVersionError: >> Preview features are not enabled for jdk/test/whitebox/WhiteBox (class file >> version 72.65535). Try running wit... > > I just remembered one more issue: > > [JDK-8247504](https://bugs.openjdk.org/browse/JDK-8247504) SA: > InstanceKlass.getSize() needs an update because of inline types > > I think this issue is relevant to these two tests, but currently they are > immune to this bug since the tests contain no value types. At one point they > were using Byte, and this caused the tests to fail in preview mode, but the > Byte reference has been removed. @plummercj Thanks for your comment! I closed JBS and filed new one as [JDK-8390014](https://bugs.openjdk.org/browse/JDK-8390014) (PR #32262) to handle `--enable-preview` in them. And also thank you for sharing related issues. > [JDK-8381336](https://bugs.openjdk.org/browse/JDK-8381336) SA FlatArray > support is incomplete Actually, noticing this problem was the first thing that happened. I tried to inspect FlatArray to learn Valhalla, but it couldn't on HSDB. I uploaded [the commit](https://github.com/YaSuenag/jdk/commit/2a876df15793313694f1b1270185d05ceb0af12e) to handle FlatArray on SA. It might not be enough so far, but it could be a base to resolve JDK-8381336. That commit could be also a base for another issues because it introduces `Inline` class to represent inline object, and exposes some fields from VMStructs for inlined object. ------------- PR Comment: https://git.openjdk.org/jdk/pull/32210#issuecomment-5224808066
