8217522: Missing barriers in some java_lang_String assertion code after JDK-8217442
Reviewed-by: shade, redestad
--- a/src/hotspot/share/classfile/javaClasses.cpp Wed Jan 23 09:57:31 2019 -0500
+++ b/src/hotspot/share/classfile/javaClasses.cpp Wed Jan 23 10:50:27 2019 -0500
@@ -578,7 +578,7 @@
}
int java_lang_String::utf8_length(oop java_string, typeArrayOop value) {
- assert(oopDesc::equals_raw(value, java_lang_String::value(java_string)),
+ assert(oopDesc::equals(value, java_lang_String::value(java_string)),
"value must be same as java_lang_String::value(java_string)");
int length = java_lang_String::length(java_string, value);
if (length == 0) {
@@ -610,7 +610,7 @@
}
char* java_lang_String::as_utf8_string(oop java_string, typeArrayOop value, char* buf, int buflen) {
- assert(oopDesc::equals_raw(value, java_lang_String::value(java_string)),
+ assert(oopDesc::equals(value, java_lang_String::value(java_string)),
"value must be same as java_lang_String::value(java_string)");
int length = java_lang_String::length(java_string, value);
bool is_latin1 = java_lang_String::is_latin1(java_string);
@@ -642,7 +642,7 @@
}
char* java_lang_String::as_utf8_string(oop java_string, typeArrayOop value, int start, int len, char* buf, int buflen) {
- assert(oopDesc::equals_raw(value, java_lang_String::value(java_string)),
+ assert(oopDesc::equals(value, java_lang_String::value(java_string)),
"value must be same as java_lang_String::value(java_string)");
assert(start + len <= java_lang_String::length(java_string), "just checking");
bool is_latin1 = java_lang_String::is_latin1(java_string);
--- a/src/hotspot/share/classfile/javaClasses.inline.hpp Wed Jan 23 09:57:31 2019 -0500
+++ b/src/hotspot/share/classfile/javaClasses.inline.hpp Wed Jan 23 10:50:27 2019 -0500
@@ -74,7 +74,7 @@
int java_lang_String::length(oop java_string, typeArrayOop value) {
assert(initialized, "Must be initialized");
assert(is_instance(java_string), "must be java_string");
- assert(oopDesc::equals_raw(value, java_lang_String::value(java_string)),
+ assert(oopDesc::equals(value, java_lang_String::value(java_string)),
"value must be same as java_lang_String::value(java_string)");
if (value == NULL) {
return 0;