RFR: 8263164: assert(_base >= VectorA && _base <= VectorZ) failed: Not a Vector while calling StoreVectorNode::memory_size()

Jie Fu jiefu at openjdk.java.net
Thu Mar 11 04:00:11 UTC 2021


On Thu, 11 Mar 2021 02:58:58 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/hotspot/share/opto/vectornode.hpp line 766:
>> 
>>> 764:   virtual int memory_size() const {
>>> 765:     if (in(MemNode::ValueIn)->bottom_type()->isa_vect() != NULL) {
>>> 766:       return vect_type()->length_in_bytes();
>> 
>> The same issue also exists when method `"vect_type()"` (line 757) is called directly, doesn't it?
>
> All codes that calles `vect_type()` in `StoreVectorNode` met the same issue. And I think it's better to make sure the `in(MemNode::ValueIn)->bottom_type()` is a `TypeVect`. We need to fix the issues that make it not the right type, doesn't it?

Good catch!
Thanks @XiaohongGong for your review.

Yes, in theory, there may be the same bug when vect_type() is called since it's based on Type::is_vect().

However, by this reasoning, there might be the same bug in non-vector types such as Type::is_int()/Type::is_long()/Type::is_ptr()/... too.

Will do more investigation.
Thanks.

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

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


More information about the hotspot-compiler-dev mailing list