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

SIGSEGV crash on sun.reflect.ConstantPool

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      OS X 10.15.3
      # JRE version: Java(TM) SE Runtime Environment (8.0_241-b07) (build 1.8.0_241-b07)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.241-b07 mixed mode bsd-amd64 compressed oops)


      A DESCRIPTION OF THE PROBLEM :
      Execute the code snippet. It always fails with a JVM crash:
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x000000010a0b8b6a, pid=3972, tid=0x0000000000000c03
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_241-b07) (build 1.8.0_241-b07)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.241-b07 mixed mode bsd-amd64 compressed oops)
      # Problematic frame:
      # V [libjvm.dylib+0x2b8b6a] binary_search(Array<Method*>*, Symbol*)+0x4


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute the snippet of code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      IllegalArgumentException (probably)
      ACTUAL -
      JVM crash

      ---------- BEGIN SOURCE ----------

      import java.util.Comparator;
      import sun.misc.SharedSecrets;
      import sun.reflect.ConstantPool;

      public class Sigsegv {

          public static void main(String[] args) {
              Comparator<?> lambda = Comparator.naturalOrder();
              ConstantPool pool = SharedSecrets.getJavaLangAccess()
                      .getConstantPool(lambda.getClass());
              // crashes JVM
              pool.getMethodAt(2);
          }
      }

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

      CUSTOMER SUBMITTED WORKAROUND :
      pool.getMethod(x), where x is not 2

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: