RFR: 8360288: Shenandoah crash at size_given_klass in op_degenerated [v2]

Aleksey Shipilev shade at openjdk.org
Tue Jul 15 19:10:42 UTC 2025


On Mon, 14 Jul 2025 23:32:55 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Both degenerated and full GCs unload classes before reclaiming unmarked humongous objects. This may result in a null klass pointer dereference when asking humongous objects for their size.
>
> William Kemper has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Reclaim humongous regions from start to end (do not use oop::size).
>  - Revert "STW collections cannot unload classes before reclaiming garbage"
>    
>    This reverts commit ae8079386eb34cf1351534ede7d7df8f81b50174.

> To be clear, by "synopsis" you mean the description of the pull request?

Yes. 

All right then, improve a synopsis and then we are good to go.

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1468:

> 1466:     region->make_trash_immediate();
> 1467:     regions_trashed++;
> 1468:     region = get_region(region->index() + 1);

Micro-optimization opportunity: track `index` as a local variable without introducing memory dependency on another region. Would likely pipeline a bit better.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26256#pullrequestreview-3021951860
PR Review Comment: https://git.openjdk.org/jdk/pull/26256#discussion_r2208433549


More information about the hotspot-gc-dev mailing list