RFR: 8315771: [JVMCI] Resolution of bootstrap methods with int[] static arguments [v5]
Doug Simon
dnsimon at openjdk.org
Wed Sep 13 13:12:42 UTC 2023
On Fri, 8 Sep 2023 14:41:59 GMT, Sacha Coppey <duke at openjdk.org> wrote:
>> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java line 488:
>>
>>> 486: *
>>> 487: * @param cpi the index of a {@code CONSTANT_Dynamic_info} or @{code CONSTANT_InvokeDynamic_info} entry
>>> 488: * @param index the index of the static argument in the list of static arguments
>>
>> What happens when `index` is out of bounds?
>
> Currently, it returns another constant pool index or a random number. I can add a check in the `CachedBSMArgs.get` method to prevent this.
Yes please. We should opt for exceptions over undefined behavior whenever possible.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15588#discussion_r1320091097
More information about the hotspot-compiler-dev
mailing list