RFR: 8376761: ARM32: Constant base assert after JDK-8373266

Stefan Karlsson stefank at openjdk.org
Tue Feb 3 08:58:05 UTC 2026


On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr.
> 
> Additional testing:
>  - [x] Linux ARM32 build now passes `java HelloWorld.java`

Could you explain why this is needed? It looks like the old code already initialized _card_table_base in the else-branch:

  if (bs->is_a(BarrierSet::CardTableBarrierSet)) {
    CardTableBarrierSet* ctbs = CardTableBarrierSet::barrier_set();
    _card_table_base = (address)ctbs->card_table_base_const();
  } else {
    _card_table_base = nullptr;
  }

Does G1 and Shenandoah answer `true` to the `bs->is_a(BarrierSet::CardTableBarrierSet)` check?

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

PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3839974235


More information about the hotspot-gc-dev mailing list