RFR: 8372617: Save and restore stubgen stubs when using an AOT code cache [v8]
Vladimir Kozlov
kvn at openjdk.org
Thu Jan 29 23:14:00 UTC 2026
On Thu, 29 Jan 2026 10:48:32 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> This PR adds save and restore of all generated stubs to the AOT code cache on x86 and aarch64. Other arches are modified to deal with the related generic PAI changes.
>>
>> Small changes were required to the aarch64 and x86_64 generator code in order to meet two key constraints:
>> 1. the first declared entry of every stub starts at the first instruction in the stub code range
>> 2. all data/code cross-references from one stub to another target a declared stub entry
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
>
> Run AOTCodeFlags test with multiple GCs
I reproduced crash locally on linux-x64-debug (fast debug build)
$ make test CONF=fast TEST=runtime/cds/appcds/aotCode/AOTCodeFlags.java#parallel
In hs_err file:
# SIGSEGV (0xb) at pc=0x00007fe1eb77da6d, pid=12380, tid=12383
#
# JRE version: Java(TM) SE Runtime Environment (27.0) (fastdebug build 27-internal-vkozlov.open)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 27-internal-vkozlov.open, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# v ~BufferBlob::final_blob (stub gen) 0x00007fe1eb77da6d
...
Stack: [0x00007fe205c5c000,0x00007fe205d5d000], sp=0x00007fe205d59790, free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v ~BufferBlob::final_blob (stub gen) 0x00007fe1eb77da6d
J 416 c1 java.util.Arrays.copyOf([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object; java.base at 27-internal (40 bytes) @ 0x00007fe1e432044e [0x00007fe1e4320180+0x00000000000002ce]
j java.util.Arrays.copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;+6 java.base at 27-internal
j java.lang.invoke.LambdaFormBuffer.startEdit()V+138 java.base at 27-internal
j java.lang.invoke.LambdaFormEditor.makeArgumentCombinationForm(ILjava/lang/invoke/MethodType;ZZ)Ljava/lang/invoke/LambdaForm;+8 java.base at 27-internal
j java.lang.invoke.LambdaFormEditor.filterArgumentForm(ILjava/lang/invoke/LambdaForm$BasicType;)Ljava/lang/invoke/LambdaForm;+108 java.base at 27-internal
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28433#issuecomment-3820875064
More information about the hotspot-dev
mailing list