RFR: Check BS type in immByteMapBase predicate

Roman Kennke rkennke at redhat.com
Tue Dec 5 10:50:10 UTC 2017


In aarch64, we have an instruction in aarch64.ad that blindly casts the 
current BarrierSet to CardTableModRefBS, and uses this in the predicate 
to generate an immediate load if the operand matches the byte_map_base 
of the CTMRBS. However, when used with a GC that doesn't derive its BS 
from the CTMRBS, it reads some random thrash and inserts the special 
instruction sequence (adrp+movk) on immediate loads that happen to match 
whatever is in the imaginary byte_map_base... This eventually leads to 
corrupted heap. The fix is to check the BS type in the predicate too:


http://cr.openjdk.java.net/~rkennke/aarch64-ctmrbs/webrev.00/src/hotspot/cpu/aarch64/aarch64.ad.udiff.html

Test: hotspot_gc_shenandoah on aarch64

I intend to push backports of this to 9 and 8 too. Do I need extra 
reviews for those?

Ok?


More information about the shenandoah-dev mailing list