hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 15 17:38:50 2014 -0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 15 18:23:26 2014 -0400
@@ -6362,7 +6362,9 @@
verify_overflow_empty();
if (should_unload_classes()) {
- ClassLoaderDataGraph::purge();
+ // Delay purge to the beginning of the next safepoint. Metaspace::contains
+ // requires that the virtual spaces are stable and not deleted.
+ ClassLoaderDataGraph::set_should_purge(true);
}
_intra_sweep_timer.stop();