RFR: JDK-8202676: AArch64: Missing enter/leave around barrier leads to infinite loop
Roman Kennke
rkennke at redhat.com
Sat May 5 09:51:47 UTC 2018
Am 05.05.2018 um 10:10 schrieb Andrew Haley:
> On 04/05/18 22:29, Roman Kennke wrote:
>> In aarch64's
>> TemplateInterpreterGenerator::generate_Reference_get_entry(void), there
>> used to be enter()/leave() calls around the g1 pre-barrier. This is
>> necessary in case the barrier calls into the runtime, to setup/remove
>> stack frames for the call. With the interpreter BarrierSetAssembler
>> work, this seems to have been dropped. It does lead to stack corruption,
>> sometimes endless loops, etc.
>>
>> This patch re-instates the enter() and leave() calls around the barrier
>> where they used to be.
>>
>> http://cr.openjdk.java.net/~rkennke/JDK-8202676/webrev.00/
>>
>> Can I please get a review?
>
> This is the second time in the last year or so that enter/leave pair has
> been deleted by GC engineers! Please stop doing this! :-)
>
> Anyway, I think it now makes more sense for the enter/leave pair to be
> in G1BarrierSetAssembler::g1_write_barrier_pre before the
> push(saved, sp). It makes more logical sense there.
>
Right.
http://cr.openjdk.java.net/~rkennke/JDK-8202676/webrev.01/
Does it hurt if it's ever called from a place where enter() / leave() is
not strictly required? I.e. if we already have an interpreter frame?
Good to push?
Roman
More information about the hotspot-dev
mailing list