JDK-8145015 : jni_GetStringCritical asserts for empty strings
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: generic
  • Submitted: 2015-12-09
  • Updated: 2016-01-28
  • Resolved: 2015-12-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b103Fixed
Related Reports
Relates :  
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.