-
Bug
-
Resolution: Fixed
-
P4
-
9, 11, 13, 15
-
b25
JEP 254: Compact Strings (JDK-8054307) added verification code to java_lang_String::create_from_unicode(), create_from_str() and create_from_symbol() to verify the result of compressing a String to Latin-1:
http://hg.openjdk.java.net/jdk9/sandbox/hotspot/rev/387da3650bc3
This verification failed in the past due to invalid UTF-8 Strings being passed through JNI (see alsoJDK-8164561). To avoid this, the verification in java_lang_String::create_from_str() was temporarily disabled:
// This check is too strict because the input string is not necessarily valid UTF8.
// For example, it may be created with arbitrary content via jni_NewStringUTF.
We need to investigate if this code can/should be enabled again and fix JNI tests that pass invalid UTF-8 Strings. We should also check if additional verification is necessary to avoid passing invalid UTF-8 Strings through VM internal code.
http://hg.openjdk.java.net/jdk9/sandbox/hotspot/rev/387da3650bc3
This verification failed in the past due to invalid UTF-8 Strings being passed through JNI (see also
// This check is too strict because the input string is not necessarily valid UTF8.
// For example, it may be created with arbitrary content via jni_NewStringUTF.
We need to investigate if this code can/should be enabled again and fix JNI tests that pass invalid UTF-8 Strings. We should also check if additional verification is necessary to avoid passing invalid UTF-8 Strings through VM internal code.
- relates to
-
JDK-8164561 Crash with assert: symbol conversion failure in java_lang_String::create_from_symbol()
- Closed
-
JDK-8271175 runtime/jni/FindClassUtf8/FindClassUtf8.java doesn't have to be run in othervm
- Resolved