RFR: 8264957: Type::dual_type array is not aligned with enum TYPES

Xiaohong Gong xgong at openjdk.java.net
Mon Apr 12 09:29:38 UTC 2021


On Fri, 9 Apr 2021 11:02:06 GMT, Jie Fu <jiefu at openjdk.org> wrote:

>> This is a bug fix for [1] which adds a new vector mask type. The new added TYPE `"VectorMask"` is inserted into `enum TYPES`, while the array `"Type::dual_type"` is not updated. This makes the array elements are not aligned with TYPES.
>> 
>> I met the following crash due to this issue when I was working on the masking feature support on panama-vector:
>> 
>>  Internal Error (/home/xiagon01/code/panama-vector/src/hotspot/share/opto/type.hpp:1727), pid=104432, tid=104449
>>  # assert(_base >= AnyPtr && _base <= KlassPtr) failed: Not a pointer
>> 
>> Adding a value like other vector types for the `"VectorMask"` in the array `"dual_type"` can fix it.
>> 
>> [1] https://bugs.openjdk.java.net/browse/JDK-8262355
>> 
>> Tested with tier1 and jdk:tier3
>
> This sounds reasonable to me.
> Thanks.

Thanks for your review @DamonFool @neliasso ! It seems the array `Type::dual_type` is not used anywhere currently. The same definition for `dual_type` is defined in https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/type.hpp#L140 and used in type.cpp, which uses `Type::dual_type` before. So I think the whole definition can be totally removed. The issue I met might not be related to it. I will have a test and remove it if everything works well. Thanks!

-------------

PR: https://git.openjdk.java.net/jdk/pull/3410


More information about the hotspot-compiler-dev mailing list