8217522: Missing barriers in some java_lang_String assertion code after JDK-8217442
authorzgu
Wed, 23 Jan 2019 10:50:27 -0500
changeset 53447 edba42d2370f
parent 53446 896ddba45177
child 53448 e422b21ca556
8217522: Missing barriers in some java_lang_String assertion code after JDK-8217442 Reviewed-by: shade, redestad
src/hotspot/share/classfile/javaClasses.cpp
src/hotspot/share/classfile/javaClasses.inline.hpp
--- 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;