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

JVM crashes on repeated access to a MethodHandle linking to Object.hashCode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 8u251, 9, 10, 11, 12
    • hotspot
    • x86_64
    • windows_10

    Description

      A DESCRIPTION OF THE PROBLEM :
      Creating a MethodHandle linking to java.lang.Object.hashCode() and invoking it more than about 12000 times in a row causes the JVM to crash. Seems to work fine on Java SE 14.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      The issue can be reproduced by running the attached code.


      ---------- BEGIN SOURCE ----------
        MethodHandle hashCode =
                  MethodHandles.lookup().findVirtual(Object.class, "hashCode", MethodType.methodType(int.class));
        
        for (int i = 0; i < 100000; i++)
            hashCode.invoke(new String());
      ---------- END SOURCE ----------

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              thartmann Tobias Hartmann
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: