diff -r be6959017765 -r 4c471254865e hotspot/src/share/vm/runtime/thread.cpp --- a/hotspot/src/share/vm/runtime/thread.cpp Wed Oct 07 19:01:55 2009 -0400 +++ b/hotspot/src/share/vm/runtime/thread.cpp Fri Oct 16 02:05:46 2009 -0700 @@ -1213,6 +1213,7 @@ { initialize(); _is_attaching = is_attaching; + assert(_deferred_card_mark.is_empty(), "Default MemRegion ctor"); } bool JavaThread::reguard_stack(address cur_sp) { @@ -2318,6 +2319,10 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) { + // Flush deferred store-barriers, if any, associated with + // initializing stores done by this JavaThread in the current epoch. + Universe::heap()->flush_deferred_store_barrier(this); + // The ThreadProfiler oops_do is done from FlatProfiler::oops_do // since there may be more than one thread using each ThreadProfiler.