I investigated EA problem when I see NULL pointer
exception of the oop field of scalar replaced object.
And during investigation I noticed that InitializeNode
doesn't cover all fields. Looking further I found
that global flag TrackedInitializationLimit is treated
differently:
c2_globals.hpp
product(intx, TrackedInitializationLimit, 50, \
"When initializing fields, track up to this many words") \
GraphKit::set_output_for_allocation()
2810 if (field->offset() >= TrackedInitializationLimit)
2811 continue; // do not bother to track really large numbers of fields
InitializeNode::captured_store_insertion_point()
2075 // after a certain size, we bail out on tracking all the stores:
2076 intptr_t ti_limit = (TrackedInitializationLimit * HeapWordSize);
2077 if (start >= ti_limit) return FAIL;
It seems, "* HeapWordSize" is missing in set_output_for_allocation().
As result, my field with offset +48 was initialized to 0, but with offset
+56 is not.