8025599: Missing store barrier with OptimizeStringConcat
Reviewed-by: kvn, twisti
Contributed-by: Axel Siebenborn <axel.siebenborn@sap.com>
--- a/hotspot/src/share/vm/opto/graphKit.cpp Fri Sep 27 11:52:24 2013 +0400
+++ b/hotspot/src/share/vm/opto/graphKit.cpp Mon Sep 30 15:42:39 2013 -0700
@@ -3849,9 +3849,9 @@
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* value_field_type = string_type->add_offset(value_offset);
- int value_field_idx = C->get_alias_index(value_field_type);
- store_to_memory(ctrl, basic_plus_adr(str, value_offset),
- value, T_OBJECT, value_field_idx);
+
+ store_oop_to_object(ctrl, str, basic_plus_adr(str, value_offset), value_field_type,
+ value, TypeAryPtr::CHARS, T_OBJECT);
}
void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) {