On Wed, 5 Nov 2025 12:46:04 GMT, Coleen Phillimore <[email protected]> wrote:

>> src/hotspot/share/oops/bsmAttribute.inline.hpp line 34:
>> 
>>> 32:       _cur_array + BSMAttributeEntry::u2s_required(argc) > 
>>> insert_into->bootstrap_methods()->length()) {
>>> 33:     return nullptr;
>>> 34:   }
>> 
>> Nit: This check needs a comment. Also, I'd suggest to add a guarantee here 
>> instead of returning `nullptr`.
>
> I agree with this comment - is returning null going to crash somewhere down 
> the line?  Is this an overflow?

Returning null generally shouldn't happen. It indicates that we have supplied 
too little space for the entries. The reason I don't `guarantee` here is 
because this function doesn't have enough context to output a proper error 
message.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27198#discussion_r2542253926

Reply via email to