RFR 8228633 [lworld][c1] method invocation fails if the return type is an unloaded Q type
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Jul 26 11:18:47 UTC 2019
Hi Ioi,
this looks good to me. Just a small suggestion: The ValueTypeTest class defines random values rI and
rL that you can use to initialize fields like Test104Value::x0 and then verify the value.
Also, the comment in ciSignature.cpp:137 should be "maybe_returns_never_null".
Thanks,
Tobias
On 26.07.19 00:35, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8228633
> http://cr.openjdk.java.net/~iklam/valhalla/8228633-unloaded-return-q-type.v01/
>
> Bug:
>
> When a C1-compiled method A calls a method B with a return type "QT;",
> but T has not be loaded at the time of compilation, the caller will
> not check if the returned value is passed as unpacked fields.
>
> Fix:
>
> I added a new function ciSignature::maybe_returns_never_null(), so we would
> always generate the "test $rax, 0x1" check in this situation. The check may not
> be necessary if it turns out that type T is too large to be returned as fields,
> but such a check is harmless.
>
> Thanks
> - Ioi
>
More information about the valhalla-dev
mailing list