# HG changeset patch # User pliden # Date 1395065925 -3600 # Node ID f53edbc2b7289d5ae3024e0429b076af97d3867f # Parent b7e42ada4898900f37b15d7fcfc984dd4a35ae62 8036673: G1: Abort weak reference processing if mark stack overflows Reviewed-by: brutisso, tschatzl diff -r b7e42ada4898 -r f53edbc2b728 src/share/vm/gc_implementation/g1/concurrentMark.cpp --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Mon Mar 17 15:18:38 2014 +0100 +++ b/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);