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

[lworld] isSubstitutable0 fails with nullable projection field in -Xint

XMLWordPrintable

      test/jdk/valhalla/valuetypes/ObjectMethods.java fails when running with -Xint

      To reproduce the failure, take out -Xcomp from @run and run with -Dvalue.debug.bsm

      generate BSM for ObjectMethods$MyValue1::equals
      generate BSM for ObjectMethods$MyValue1::toString
      test ObjectMethods.testEquals(ObjectMethods$MyValue1@a63ab4a, ObjectMethods$MyValue1@a63ab4a, true): success
      substitutable [ObjectMethods$MyValue1 p=[Point x=0 y=0] np=null] vs [ObjectMethods$MyValue1 p=[Point x=0 y=0] np=null]
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (interpreterRuntime.cpp:530), pid=53400, tid=40451
      # guarantee(!HAS_PENDING_EXCEPTION) failed: isSubstitutable() raised exception
      #
      # JRE version: OpenJDK Runtime Environment (13.0) (build 13-internal+0-adhoc.mlchung.lworld-open)
      # Java VM: OpenJDK 64-Bit Server VM (13-internal+0-adhoc.mlchung.lworld-open, mixed mode, compressed oops, g1 gc, bsd-amd64)
      # 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:
      # /scratch/mchung/ws/valhalla/lworld-open/JTwork/scratch/hs_err_pid53400.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #
      ----------System.err:(35/2516)----------
      java.lang.NullPointerException: Point is an inline class
              at java.base/java.lang.Class.cast(Class.java:3721)
              at java.base/java.lang.invoke.ValueBootstrapMethods.isSubstitutable0(ValueBootstrapMethods.java:532)
              at java.base/java.lang.invoke.ValueBootstrapMethods$MethodHandleBuilder.eq(ValueBootstrapMethods.java:208)
              at ObjectMethods$MyValue1.equals(ObjectMethods.java:180)
              at ObjectMethods.testEquals(ObjectMethods.java:92)

      ----------------------------------------
      Stack trace in hs_err log
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x837968] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x660
      V [libjvm.dylib+0x837f57] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x47
      V [libjvm.dylib+0x27674e] report_vm_error(char const*, int, char const*, char const*, ...)+0xa9
      V [libjvm.dylib+0x3b5c46] InterpreterRuntime::is_substitutable(JavaThread*, oopDesc*, oopDesc*)+0x154
      j java.lang.invoke.ValueBootstrapMethods$MethodHandleBuilder.eq(Ljava/lang/Object;Ljava/lang/Object;)Z+2 java.base@13-internal
      j java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)I+11 java.base@13-internal
      j java.lang.invoke.DelegatingMethodHandle$Holder.reinvoke_L(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)I+14 java.base@13-internal
      j java.lang.invoke.LambdaForm$MH.guard(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)I+34 java.base@13-internal
      j java.lang.invoke.LambdaForm$MH.linkToTargetMethod(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)I+6 java.base@13-internal
      j ObjectMethods$MyValue1.equals(Ljava/lang/Object;)Z+2
      j ObjectMethods.testEquals(Ljava/lang/Object;Ljava/lang/Object;Z)V+2

            mchung Mandy Chung (Inactive)
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: