JDK-8306669 : Disabling in-lining prevent propagating larval state
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • CPU: generic
  • Submitted: 2023-04-21
  • Updated: 2023-04-21
  • Resolved: 2023-04-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaResolved
Related Reports
Duplicate :  
Description
Please consider following pseudo-code:-

  class abstract_class {}
  value class value_class : public abstract_class {}

  callee:  () L<abstract_class>;
         var  obj = Unsafe.makePrivateBuffer(value_object);
         return obj;

 caller:
         var return = (value_class)callee();
         Unsafe.putFloat(return, 1.0f);

Currently C2 compiler always create an InlineType IR to represent a value object.  In above case makePrivateBuffer will buffer the InlineType node and set the larval flag of newly created AllocateNode node. 

Lets say callee is not in-lined (or an explicit JVM flag -XX:-Inline is used), return type signature signifies an abstract identity class,  an explicit checkcast over return value will create InlineType node.  However, newly created IR type may not carry the larval state of actual returned value.  

This may cause problems while processing subsequent Unsafe.put operations.
Comments
This is another duplicate of JDK-8239003.
21-04-2023