RFR: 8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack
Andrew Haley
aph at openjdk.java.net
Tue Mar 2 09:28:47 UTC 2021
On Tue, 2 Mar 2021 06:36:27 GMT, Nick Gasson <ngasson at openjdk.org> wrote:
> StubAssembler::call_RT() has some code to shuffle arguments using the
> stack as temporary storage. But there's a typo: the first pre(sp, 2 *
> wordSize) should be pre(sp, -2 * wordSize) otherwise the pushes and pops
> are unbalanced.
>
> I think this was exposed by JDK-8259619 which fixed the conflict check
> but AFAIK it only causes a problem on the Valhalla lworld branch and is
> not used otherwise.
>
> I would rather replace this code with an assert that the conflict never
> occurs as we are in full control of the argument registers passed to
> call_RT (the PPC port does this, for example).
Yes, looks like a simple mistake from 2013. Thanks.
-------------
Marked as reviewed by aph (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2787
More information about the hotspot-compiler-dev
mailing list