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

JDI API output mismatch causes JDK 8 test failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 8u461
    • core-svc
    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      openjdk version "11.0.28" 2025-07-15
      OpenJDK Runtime Environment Temurin-11.0.28+6 (build 11.0.28+6)
      OpenJDK 64-Bit Server VM Temurin-11.0.28+6 (build 11.0.28+6, mixed mode)

      openjdk version "1.8.0_462"
      OpenJDK Runtime Environment (Temurin)(build 1.8.0_462-b08)
      OpenJDK 64-Bit Server VM (Temurin)(build 25.462-b08, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      When I was performing regression testing using a test case from the GitHub repository (https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/max/max001.java), I found that the API used in this test case produces different outputs on OpenJDK 8 and OpenJDK 11. This causes the test case to execute normally on 11, but throw an Exception on 8. The source code below is a simplified test program we provided. When executed with OpenJDK 8, its output is 'home', but when executed with OpenJDK 11, the output is 'pid'. I believe this is caused by an issue within OpenJDK 8. Of course, to ensure OpenJDK 8 could run this program, we added tools.jar to assist its execution.


      ---------- BEGIN SOURCE ----------
      import com.sun.jdi.Bootstrap;
      import com.sun.jdi.connect.Connector;

      import java.util.Iterator;
      import java.util.Map;

      public class test {
          public static void main(String[] var0) {
              Iterator var4 = Bootstrap.virtualMachineManager().allConnectors().iterator();
              Map var8 = ((Connector)var4.next()).defaultArguments();
              Iterator var3 = var8.keySet().iterator();
              String var2 = (String)var3.next();
              System.out.println(var2);
          }
      }

      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: