RFR: 8293691: converting a defined BasicType value to a string should not crash the VM [v2]

Johan Sjölen jsjolen at openjdk.org
Wed Sep 28 10:45:03 UTC 2022


On Tue, 27 Sep 2022 18:09:14 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use ARRAY_SIZE instead
>
> src/hotspot/share/utilities/globalDefinitions.cpp line 240:
> 
>> 238: };
>> 239: const char* type2name(BasicType t) {
>> 240:   if (t < (T_CONFLICT + 1)) {
> 
> Suggestion:
> 
>   if (t < ARRAY_SIZE(type2name_tab)) {

Fixed

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

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


More information about the hotspot-dev mailing list