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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 8, 11, 13, 14
    • hotspot
    • b19

      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"

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

              Created:
              Updated:
              Resolved: