Integrated: 8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack

Nick Gasson ngasson at openjdk.java.net
Tue Mar 2 09:59:43 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).

This pull request has now been integrated.

Changeset: be67aaab
Author:    Nick Gasson <ngasson at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/be67aaab
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack

Reviewed-by: aph

-------------

PR: https://git.openjdk.java.net/jdk/pull/2787


More information about the hotspot-compiler-dev mailing list