RFR: 8338257: UTF8 lengths should be size_t not int [v5]

David Holmes dholmes at openjdk.org
Tue Aug 27 12:13:05 UTC 2024


On Tue, 27 Aug 2024 08:22:57 GMT, Dean Long <dlong at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   more missing casts
>
> src/hotspot/share/utilities/utf8.cpp line 127:
> 
>> 125:     prev = c;
>> 126:   }
>> 127:   return checked_cast<int>(num_chars);
> 
> Ideally, this function would return size_t.

Why? I think that would have a large flow on effect. And this length does fit in an int.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20560#discussion_r1732727140


More information about the hotspot-dev mailing list