RFR: 8352724: Verify bounds for primitive array reads in JVMCI [v3]

Doug Simon dnsimon at openjdk.org
Mon Apr 14 16:41:44 UTC 2025


On Mon, 14 Apr 2025 16:33:07 GMT, Andrej Pečimúth <duke at openjdk.org> wrote:

>> This PR adds a bounds check for primitive array reads in JVMCI. When a JVMCI compiler attempts to read after the last array element (from the padding of the allocated object), JVMCI should throw an exception instead of returning a garbage value. The check added in this PR handles both primitive and object reads.
>
> Andrej Pečimúth has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Test array reads that are partially out of bounds.

Thanks for the new tests.

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

Marked as reviewed by dnsimon (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24200#pullrequestreview-2764946450


More information about the graal-dev mailing list