RFR: JDK-8277060: EXCEPTION_INT_DIVIDE_BY_ZERO in TypeAryPtr::dump2 with -XX:+TracePhaseCCP [v2]

Tobias Holenstein tholenstein at openjdk.org
Thu Jun 30 07:14:39 UTC 2022


On Wed, 29 Jun 2022 20:02:38 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   stronger assert
>
> src/hotspot/share/utilities/globalDefinitions.cpp line 326:
> 
>> 324: #ifdef ASSERT
>> 325: int type2aelembytes(BasicType t, bool allow_address) {
>> 326:   assert((allow_address || t != T_ADDRESS) && t != T_ILLEGAL, "unexpected basic type");
> 
> This is OK, but it only handles one possible bad value.  How about checking that t <= T_CONFLICT, or t < ARRAY_SIZE(__type2aelembytes)?

good point! I updated it

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

PR: https://git.openjdk.org/jdk/pull/9295


More information about the hotspot-dev mailing list