This is very much related to JDK-8269830 and how BasicTypeDataBase.addressTypeIsEqualToType(addr, type) looks at the end of the object to find vtableptrs, which is only necessary on Solaris, which is no longer supported. This could lead to matching on the wrong type, although unlike JDK-8269830 I don't know of any test failures as a result of this, so the fix is not being included with JDK-8269830.
All the loc2 and loc3 related code in BasicTypeDataBase.findDynamicTypeForAddress(addr, basetype) should be stripped out. This would make it much simpler, and get rid of the risk of matching on the wrong type.