--- old/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp 2014-05-13 12:12:12.351179394 +0200 +++ new/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp 2014-05-13 12:12:12.221311342 +0200 @@ -96,7 +96,15 @@ jbyte *const first = byte_for(mr.start()); jbyte *const last = byte_after(mr.last()); - memset(first, g1_young_gen, last - first); + // Below we may use an explicit loop instead of memset() because on + // certain platforms memset() can give concurrent readers phantom zeros. + if (UseMemSetInBOT) { + memset(first, g1_young_gen, last - first); + } else { + for (jbyte* i = first; i < last; i++) { + *i = g1_young_gen; + } + } } #ifndef PRODUCT