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

Test tools/javac/tree/MakeTypeTest.java fails with -Xcheck:jni

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8, 11, 13, 14
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b19

      Description

      It looks like the JNI local handles capacity isn't enough in System.c:

      52724: // Ensure capacity for the array and for a string for each fixed length element
      52724: if ((*env)->EnsureLocalCapacity(env, nstrings + 2) < 0) {
      52724: return NULL;
      52724: }

      -Xcheck:jni gives an error:

      STDOUT:
      WARNING: JNI local refs: 74, exceeds capacity: 73
      at jdk.internal.util.SystemProps$Raw.vmProperties(java.base/Native Method)
      at jdk.internal.util.SystemProps$Raw.cmdProperties(java.base/SystemProps.java:253)
      at jdk.internal.util.SystemProps.initProperties(java.base/SystemProps.java:55)
      at java.lang.System.initPhase1(java.base/System.java:2004)

      To reproduce run:
      make test TEST=tools/javac/tree/MakeTypeTest.java JTREG="VM_OPTIONS=-Xcheck:jni"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: