RFR: 8326615: C1/C2 don't handle allocation failure properly during initialization (RuntimeStub::new_runtime_stub fatal crash) [v2]
Damon Fenacci
dfenacci at openjdk.org
Thu May 23 09:00:03 UTC 2024
On Tue, 21 May 2024 21:33:28 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Damon Fenacci has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Update src/hotspot/share/c1/c1_Runtime1.cpp
>>
>> Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
>> - Update src/hotspot/share/c1/c1_Compiler.cpp
>>
>> Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
>
> src/hotspot/share/c1/c1_Runtime1.cpp line 287:
>
>> 285: #endif
>> 286: BarrierSetC1* bs = BarrierSet::barrier_set()->barrier_set_c1();
>> 287: bs->generate_c1_runtime_stubs(blob);
>
> Don't we need to handle failures in generate_c1_runtime_stubs? With the assert removed, I think we'll get a nullptr crash.
Yep, you're right. Actually that call could potentially fail too.
I've added code to handle that case as well.
Thanks @dean-long!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19280#discussion_r1611292612
More information about the hotspot-compiler-dev
mailing list