RFR: 8202978: Incorrect tmp register passed to MacroAssembler::load_mirror()

Per Liden per.liden at oracle.com
Fri May 11 12:48:51 UTC 2018

On 05/11/2018 02:32 PM, Vladimir Kozlov wrote:
> Looks good.

Thanks Vladimir!

> Is this new code? Should we backport it otherwise?

Yes, this is new code, i.e. it's not in JDK 10 or older. Also, it just 
so happens that this bug doesn't affect the existing GC, only GCs which 
do load barriers (like ZGC), which is why it hasn't been caught before.


> Thanks,
> Vladimir K
> On 5/11/18 1:31 AM, Per Liden wrote:
>> On x86, MacroAssembler::load_mirror() defaults to using rscratch2 as 
>> tmp register, unless something else is specified. In 
>> TemplateInterpreterGenerator::generate_native_entry() we call 
>> load_mirror(), but the rscratch2 register is already in use in this 
>> context, which obviously leads to problems. This is not a performance 
>> critical path, so we should just pass noreg as the tmp register.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8202978
>> Webrev: http://cr.openjdk.java.net/~pliden/8202978/webrev.0
>> Testing: passes hs-tier{1,2}
>> /Per

More information about the hotspot-runtime-dev mailing list