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

jni_GetStringCritical asserts for empty strings

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b103
    • CPU:
      generic

      Description

      Change "8141132: JEP 254: Compact Strings" removed the handling of empty strings from jni_GetStringCritical(). As a consequence, the functions will now assert with:

      assert(is_within_bounds(which)) failed: index 0 out of bounds 0

      if called for a string of length zero.

      jni_GetStringCritical() also doesn't handle out-of-memory situations when creating a new character array. I'll add that as well into the fix.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simonis Volker Simonis
                Reporter:
                simonis Volker Simonis
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: