[lworld] RFR: 8373567: [lworld] Move array copy exception throwing out of GC barriers [v2]

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Dec 15 09:12:55 UTC 2025


On Fri, 12 Dec 2025 10:07:21 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> The lworld branch has support for null-restricted arrays, and to support this code has been adjacent to the code that perform array copy check casts. The code that performs the check casts used to be located inside the GC access barriers, but the code that finally threw exceptions were located in the runtime code. In the lworld branch the code that throws the check cast exception and the new null pointer exception has been moved into the GC access barriers.
>> 
>> I propose that we revert back to the old style where the exception throwing was somewhat decoupled from the GC access barriers.
>
> Stefan Karlsson has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Mark oop_arraycopy as nodiscard
>  - Terminate OopCopyResult in oop_arraycopy_raw

I think it is more preferable having the exception code on the outside of the access layer.
Thanks for fixing this. Looks good.

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

Marked as reviewed by aboldtch (no project role).

PR Review: https://git.openjdk.org/valhalla/pull/1792#pullrequestreview-3577147457


More information about the valhalla-dev mailing list