RFR 8228633 [lworld][c1] method invocation fails if the return type is an unloaded Q type

Ioi Lam ioi.lam at oracle.com
Thu Jul 25 22:35:36 UTC 2019


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