RFR: 8347406: [REDO] C1/C2 don't handle allocation failure properly during initialization (RuntimeStub::new_runtime_stub fatal crash) [v3]

Damon Fenacci dfenacci at openjdk.org
Thu Feb 27 11:35:09 UTC 2025


On Thu, 20 Feb 2025 21:34:16 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Damon Fenacci has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   JDK-8347406: return immediately if stub generation fails
>
> src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp line 306:
> 
>> 304:                                 _load_reference_barrier_phantom_rt_code_blob != nullptr;
>> 305:   }
>> 306:   return _pre_barrier_c1_runtime_code_blob != nullptr && reference_barrier_success;
> 
> Wouldn't it be better to return false immediately after each failure, rather than continuing?

Yes, totally. Fixed.

> src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp line 543:
> 
>> 541:   _store_barrier_on_oop_field_without_healing =
>> 542:     generate_c1_store_runtime_stub(blob, false /* self_healing */, "store_barrier_on_oop_field_without_healing");
>> 543:   return _load_barrier_on_oop_field_preloaded_runtime_stub != nullptr &&
> 
> Again, why not return false immediately on first failure?

Fixed too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23630#discussion_r1973402325
PR Review Comment: https://git.openjdk.org/jdk/pull/23630#discussion_r1973402472


More information about the shenandoah-dev mailing list