Integrated: 8364042: UnsafeMemoryAccess will not work with AOT cached code stubs
Andrew Dinn
adinn at openjdk.org
Wed Jul 30 10:11:01 UTC 2025
On Mon, 28 Jul 2025 16:38:43 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.
This pull request has now been integrated.
Changeset: a6fb87db
Author: Andrew Dinn <adinn at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a6fb87dbe8c4165ca498caa23541f6aa4426b71d
Stats: 77 lines in 8 files changed: 63 ins; 12 del; 2 mod
8364042: UnsafeMemoryAccess will not work with AOT cached code stubs
Reviewed-by: asmehra, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/26511
More information about the hotspot-dev
mailing list