On Tue, 27 Aug 2024 07:09:33 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> src/hotspot/share/classfile/javaClasses.cpp line 555:
>> 
>>> 553:   bool      is_latin1 = java_lang_String::is_latin1(java_string);
>>> 554: 
>>> 555:   if (length == 0) return nullptr;
>> 
>> Should this be checking for length <= 0?  It looks like length can indeed be 
>> negative if UTF8::unicode_length() tries to return the length of a utf8 
>> string with length > 0x7fffffff.
>
> ??? length is assigned on line 552 and again comes from the length of a Java 
> array.

OK.

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

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

Reply via email to