RFR: 8364042: UnsafeMemoryAccess will not work with AOT cached code stubs [v2]
Vladimir Kozlov
kvn at openjdk.org
Tue Jul 29 16:35:56 UTC 2025
On Tue, 29 Jul 2025 07:29:42 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> Array copy stubs may legitimately generate SEGV errors during copying. They rely on class UnsafeMemoryAccess to record and expose to the signal handler a table of address ranges within which a SEGV should be dealt with by redirecting execution to an associated handler address. The handler address may lie within the same stub or may default to an independent entry belonging to a specific, non-copy stub within the same blob. Normally entries are added to the table as a side-effect of generating the stub.
>>
>> This patch implements the preliminary steps needed to enable save and restore of the UnsafeMemoryAccess table entries alongside with their associated AOT compiled copy stubs. It adds the common entry to the entry declarations list so it can be saved to the AOT cache during the assembly phase and reloaded, relocated and installed as the table default entry during a production run. It also implements an API that allows table entries associated with a given stub to be identified and saved during an assembly run, and retrieved, relocated and restored to the table during a production run.
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
>
> update all arches to set unsafecopy_common entry
Good.
-------------
Marked as reviewed by kvn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26511#pullrequestreview-3068334611
More information about the hotspot-dev
mailing list