--- old/src/share/vm/gc_interface/collectedHeap.cpp Wed Aug 24 15:01:39 2011 +++ new/src/share/vm/gc_interface/collectedHeap.cpp Wed Aug 24 15:01:39 2011 @@ -158,7 +158,13 @@ Copy::zero_to_words(obj, new_tlab_size); } else { // ...and clear just the allocated object. - Copy::zero_to_words(obj, size); +#ifdef ASSERT + // Skip mangling the space corresponding to the object header to + // ensure that the returned space is not considered parsable by + // any concurrent GC thread. + size_t hdr_size = oopDesc::header_size(); + Copy::fill_to_words(obj + hdr_size, new_tlab_size - hdr_size, badHeapWordVal); +#endif // ASSERT } thread->tlab().fill(obj, obj + size, new_tlab_size); return obj;