[lworld] Integrated: 8272307: [lworld] [AArch64] TestCallingConventionC1 test63 and test64 get incorrect result

Nick Gasson ngasson at openjdk.java.net
Fri Aug 13 10:18:46 UTC 2021

On Thu, 12 Aug 2021 09:04:43 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

> These two were hidden by the earlier IR test failures.  The errors look like:
>   Caused by: java.lang.RuntimeException: assertEquals: expected -1163019586 to equal 777
>   at jdk.test.lib.Asserts.fail(Asserts.java:594)
>   at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
>   at jdk.test.lib.Asserts.assertEquals(Asserts.java:189)
>   at jdk.test.lib.Asserts.assertEQ(Asserts.java:166)
>   at compiler.valhalla.inlinetypes.TestCallingConventionC1.test64_verifier(TestCallingConventionC1.java:1518)
>   ... 9 more
> In the C1 scalarised entry point we call a runtime stub to allocate objects for buffering the incoming inline types.  The runtime stub returns its result in r0 which is also j_rarg7 and might be holding a live argument value.  To work around this we temporarily move j_rarg7 into r21 which is known to be free at this point and then move it back after the call.  However if a GC occurs during the runtime call and an object held in j_rarg7 is moved, r21 will still be pointing at the old from-space copy after the call returns because it's not recorded in the oop map.  Fix that by having the stub return the object array in r20 and leave r0-r7 untouched.

This pull request has now been integrated.

Changeset: f85b10be
Author:    Nick Gasson <ngasson at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/f85b10beff2404c370b175b1cd01bf209b5f3388
Stats:     20 lines in 2 files changed: 7 ins; 8 del; 5 mod

8272307: [lworld] [AArch64] TestCallingConventionC1 test63 and test64 get incorrect result

Reviewed-by: thartmann


PR: https://git.openjdk.java.net/valhalla/pull/527

More information about the valhalla-dev mailing list