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

Hotspot can't handle Exception properly after stackoverflow capture

XMLWordPrintable

    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      Linux Ubuntu20.04

      openjdk version "1.8.0_402"
      OpenJDK Runtime Environment (Temurin)(build 1.8.0_402-b06)
      OpenJDK 64-Bit Server VM (Temurin)(build 25.402-b06, mixed mode)

      openjdk version "11.0.22" 2024-01-16
      OpenJDK Runtime Environment Temurin-11.0.22+7 (build 11.0.22+7)
      OpenJDK 64-Bit Server VM Temurin-11.0.22+7 (build 11.0.22+7, mixed mode)

      openjdk version "17.0.10" 2024-01-16
      OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7)
      OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      TestCase1's entry main call function run(), and the internal nesting until the Error is thrown, in the code after the Error is caught and processed to trigger an UnsupportedEncodingException, but Hotspot can not properly load the Class, and NoClassDefFoundError is thrown.

      For easy reproduction, we uploaded the test cases to Google Cloud Drive.
      https://drive.google.com/file/d/1CY2ZYvD6aJ5Wbr6tEJhj_HyclvMCDXLM/view?usp=sharing

      REGRESSION : Last worked in version 8u401

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      java-8/bin/java TestCase1

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Exception in thread "main" java.io.UnsupportedEncodingException:
      at java.io.PrintStream.toCharset(PrintStream.java:96)
      at java.io.PrintStream.<init>(PrintStream.java:248)
      at TestCase1.run(Unknown Source)
      at TestCase1.main(Unknown Source)
      ACTUAL -
      Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.misc.Launcher$BootClassPathHolder
      ...
      ...

      ---------- BEGIN SOURCE ----------
      import java.io.PrintStream;

      public class TestCase1 {
          public static void main(String[] var0) {
              (new TestCase1()).run();
          }
          
          public void run() {
              try {
                  this.run();
              } catch (Throwable var1) {
                  new PrintStream("", "");
              }
          }
          
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


            dholmes David Holmes
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: