changeset 23463:8a9ab140068a

8036673: G1: Abort weak reference processing if mark stack overflows Reviewed-by: brutisso, tschatzl
author pliden
date Mon, 17 Mar 2014 15:18:45 +0100
parents 390b23dd6f5d
children ae470a2efd44
files hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Mar 17 15:18:38 2014 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Mar 17 15:18:45 2014 +0100
@@ -2529,6 +2529,11 @@
     assert(!rp->discovery_enabled(), "Post condition");
   }
 
+  if (has_overflown()) {
+    // We can not trust g1_is_alive if the marking stack overflowed
+    return;
+  }
+
   g1h->unlink_string_and_symbol_table(&g1_is_alive,
                                       /* process_strings */ false, // currently strings are always roots
                                       /* process_symbols */ true);