-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: hotspot
GraphKit::set_output_for_allocation will create 1 NarrowMemProjNode for each of the fields of the allocation. The intention is to materialize the fact that the allocation touches the memory of the allocated class and nothing else.
Obviously, we can only know this set if the allocated class is a constant. However, in GraphKit::set_output_for_allocation, I see no test checking the oop_type is of an exact class. When getting the ciInstanceKlass from which the fields are extracted, we use oop_type->instance_klass() which only returns the type such that all values of oop_type will subtype this ciInstanceKlass.
Obviously, we can only know this set if the allocated class is a constant. However, in GraphKit::set_output_for_allocation, I see no test checking the oop_type is of an exact class. When getting the ciInstanceKlass from which the fields are extracted, we use oop_type->instance_klass() which only returns the type such that all values of oop_type will subtype this ciInstanceKlass.
- relates to
-
JDK-8327963 C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed
-
- Resolved
-