RFR: 8367656: Refactor Constantpool's operand array into two [v12]
Johan Sjölen
jsjolen at openjdk.org
Wed Nov 19 14:33:21 UTC 2025
On Wed, 5 Nov 2025 12:46:04 GMT, Coleen Phillimore <coleenp at openjdk.org> 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
More information about the hotspot-dev
mailing list