RFR: 8299570: [JVMCI] Insufficient error handling when CodeBuffer is exhausted

Tom Shull duke at openjdk.org
Tue Jan 17 18:33:50 UTC 2023


On Wed, 11 Jan 2023 16:58:53 GMT, Tom Rodriguez <never at openjdk.org> wrote:

>> This PR fixes the handling of a full CodeBuffer when emitting stubs as part of JVMCI code installation.
>
> src/hotspot/share/jvmci/jvmciCodeInstaller.cpp line 1181:
> 
>> 1179:     if (_next_call_type == INVOKESTATIC || _next_call_type == INVOKESPECIAL) {
>> 1180:       // Need a static call stub for transitions from compiled to interpreted.
>> 1181:       if (CompiledStaticCall::emit_to_interp_stub(buffer, _instructions->start() + pc_offset) == nullptr) {
> 
> We use estimate_stubs_size to presize the buffer to include space for these so it should never fail I think, but we should be checking anyway.  Maybe estimate_stubs_size should be computing space for the aarch64 trampolines?

it looks like estimate_stubs_size is computing space for the trampolines via 

`size += trampoline_stubs * CompiledStaticCall::to_trampoline_stub_size();`?

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

PR: https://git.openjdk.org/jdk/pull/11945


More information about the hotspot-compiler-dev mailing list