[aarch64-port-dev ] jdk1 Fix for hotspot/test/gc/g1/TestJNIWeakG1/TestJNIWeakG1.java
Stuart Monteith
stuart.monteith at linaro.org
Wed Aug 16 17:13:54 UTC 2017
In MacroAssembler::g1_write_barrier_pre I'm thinking:
3644 if (obj != noreg)
3645 assert_different_registers(obj, pre_val, tmp, rscratch1);
3646 else
3647 assert_different_registers(pre_val, tmp, rscratch1);
However, I don't understand why that condition would be there and not just:
assert_different_registers(obj, pre_val, tmp, rscratch1);
as the other registers ought not to be "noreg" - although there is a
separate useful assert for pre_val.
On the same principle, would it be acceptable to add the following in
the same patch to MacroAssembler::g1_write_barrier_post?
I've tried adding the following, but I'll need to get back to you as
it might be tripping:
assert_different_registers(store_addr, new_val, thread, tmp, tmp2,
rscratch1);
BR,
Stuart
On 16 August 2017 at 17:39, Andrew Haley <aph at redhat.com> wrote:
> On 16/08/17 12:34, Stuart Monteith wrote:
>> There was a bug introduced by "8176100 G1 Need prebarrier on deference
>> of weak JNI handles" where a rscratch1 is being passed to
>> g1_write_barrier_pre where it is already using rscratch1. This causes
>> the TestJNIWeakG1 testcase to SIGSEGV as the temporary register is
>> being used fro two conflicting purposes.
>
> We need an assert to make sure this doesn't happen again.
>
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list