[jdk8u-dev] RFR: 8250825: C2 crashes with assert(field != __null) failed: missing field [v2]
SendaoYan
syan at openjdk.org
Wed Aug 28 03:30:25 UTC 2024
On Wed, 28 Aug 2024 03:19:32 GMT, SendaoYan <syan at openjdk.org> wrote:
>> hotspot/src/share/vm/opto/type.cpp line 2561:
>>
>>> 2559: BasicType basic_elem_type = field->layout_type();
>>> 2560: _is_ptr_to_narrowoop = UseCompressedOops && (basic_elem_type == T_OBJECT ||
>>> 2561: basic_elem_type == T_ARRAY);
>>
>> This line hasn't been adjusted to line up with the one above.
>>
>> Are you not backporting from the 11u patch? That also doesn't have JDK-8230505 and would match your patch exactly if not for this misaligned line.
>>
>> This is the 11u version:
>>
>> ~~~
>> - assert(field != NULL, "missing field");
>> - BasicType basic_elem_type = field->layout_type();
>> - _is_ptr_to_narrowoop = UseCompressedOops && (basic_elem_type == T_OBJECT ||
>> - basic_elem_type == T_ARRAY);
>> + if (field != NULL) {
>> + BasicType basic_elem_type = field->layout_type();
>> + _is_ptr_to_narrowoop = UseCompressedOops && (basic_elem_type == T_OBJECT ||
>> + basic_elem_type == T_ARRAY);
>> + } else {
>> + // unsafe access
>> + _is_ptr_to_narrowoop = UseCompressedOops;
>> + }
>> ~~~
>
> No, I was backported from jdk trunk repo. But I think line 2561 is not misaligned line, it just a github code display style issue. The below screenshot can explain the difference. The left side shows this PR change, the right side shows the jdk11u-dev change of JDK-8250825. I think the change is equivalent.
>
> 
Backport from jdk11u-dev to jdk8u-dev is more reasonable and exactly than from jdk trunk. I will pay attention for that.
-------------
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/552#discussion_r1733926318
More information about the jdk8u-dev
mailing list