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

[MVT] Failure to handle the return of values from a JNI method

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      HotSpot fails to correctly process a __Value returned from a JNI method.

      For example, take a simple identity function (defined in Unsafe for convenience):

      UNSAFE_ENTRY(jobject, Unsafe_GetValueIdentity(JNIEnv *env, jobject unsafe, jobject jbase)) {
          return jbase;
      } UNSAFE_END

      Calling this method from Java will:

      1) for -XX:+ValueTypeReturnedAsFields result HotSpot crashing as it attempts to reconstruct a value from it's parts.

      2) for -XX:-ValueTypeReturnedAsFields result in the return of a null value

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                psandoz Paul Sandoz (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: