8134992: vm/gc/compact/Compact_InternedStrings_Strings failed due to a malloc() failure
authordrwhite
Wed, 24 Feb 2016 09:25:39 +0100
changeset 36363 394562fd49a3
parent 36362 3113b1b523c4
child 36364 5971776598e5
8134992: vm/gc/compact/Compact_InternedStrings_Strings failed due to a malloc() failure Reviewed-by: mgerdin, brutisso
hotspot/src/share/vm/gc/shared/collectedHeap.cpp
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Thu Feb 25 01:55:45 2016 +0000
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Wed Feb 24 09:25:39 2016 +0100
@@ -405,7 +405,9 @@
 oop CollectedHeap::new_store_pre_barrier(JavaThread* thread, oop new_obj) {
   // If a previous card-mark was deferred, flush it now.
   flush_deferred_store_barrier(thread);
-  if (can_elide_initializing_store_barrier(new_obj)) {
+  if (can_elide_initializing_store_barrier(new_obj) ||
+      new_obj->is_typeArray()) {
+    // Arrays of non-references don't need a pre-barrier.
     // The deferred_card_mark region should be empty
     // following the flush above.
     assert(thread->deferred_card_mark().is_empty(), "Error");