Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8344604

[LOOM] Test AOTClassLinkingVMOptions.java fails InaccessibleObjectException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • repo-loom
    • repo-loom
    • hotspot
    • x86_64, aarch64
    • linux

      Test command:
      rm -rf tmp ; time jtreg -J-Djavatest.maxOutputSize=999999999 -w tmp -nr -v:fail,error -testThreadFactoryPath:$PWD/build/linux-`arch`-server-release/images/test/jtreg_test_thread_factory/jtregTestThreadFactory.jar -testThreadFactory:Virtual -jdk:build/linux-x86_64-server-release/images/jdk/ test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTClassLinkingVMOptions.java

      Test log snippet:

       stderr: [openjdk version "24-internal" 2025-03-18
      OpenJDK Runtime Environment (build 24-internal-b2d3f866)
      OpenJDK 64-Bit Server VM (build 24-internal-b2d3f866, mixed mode, sharing)
      Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make public static void com.bars.Main.main(java.lang.String[]) accessible: module com.bars does not "exports com.bars" to unnamed module @251a69d7
              at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:353)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:329)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:277)
              at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:182)
              at java.base/java.lang.reflect.Method.setAccessible(Method.java:176)
              at jdk.test.lib.process.ProcessTools.main(ProcessTools.java:1001)
      ]
       exitValue = 1

      java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [1]
              at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:522)
              at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:206)
              at AOTClassLinkingVMOptions.modulePathTests(AOTClassLinkingVMOptions.java:122)
              at AOTClassLinkingVMOptions.main(AOTClassLinkingVMOptions.java:90)

            Unassigned Unassigned
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: