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

Tobias Hartmann thartmann at openjdk.java.net
Thu Aug 12 12:39:48 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.

Looks good to me.

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

Marked as reviewed by thartmann (Committer).

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


More information about the valhalla-dev mailing list