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

jdb crashes in jni_IsInstanceOf when printing value type array element

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • repo-valhalla
    • repo-valhalla
    • core-svc
    • None

      1. Compile the sample test.
      2. Start jdb:
      $ jdb -classpath . -XX:+EnableValhalla Test
      3. Set breakpoint on the line with System.out.println()
      > stop at Test:7
      4. Run to breakpoint
      > run
      5. Invoke "print" cmd
      >print varr[0]

      Expected result:
      [value class Test$MyValue, 11, d]

      Actual result:
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00000001099f7144, pid=63994, tid=23555
      #
      # JRE version: OpenJDK Runtime Environment (12.0) (build 12-internal+0-adhoc.datitov.valhalla)
      # Java VM: OpenJDK 64-Bit Server VM (12-internal+0-adhoc.datitov.valhalla, mixed mode, compressed oops, g1 gc, bsd-amd64)
      # Problematic frame:
      # V [libjvm.dylib+0x3f7144] jni_IsInstanceOf+0xa2
      #
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # An error report file with more information is saved as:
      # /Users/datitov/src/valhalla/hs_err_pid63994.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #




      ================================
      public class Test {

        public static void main(String[] args){

          MyValue[] varr = new MyValue[2];
          varr[0] = new MyValue(11,'d');
          System.out.println("v = " + varr[0]);
        }

        public final __ByValue static class MyValue {
            int a;
            char b;

            public MyValue(int a, char b) {
              this.a = a;
              this.b = b;
            }
        }
      }

            fparain Frederic Parain
            dtitov Daniil Titov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: