RFR: 8375046: C2: Assertion failed in GrowableArray::remove_till(0) [v4]

Vladimir Ivanov vlivanov at openjdk.org
Tue Jan 20 19:42:47 UTC 2026


On Mon, 19 Jan 2026 10:25:43 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> The case shows up in CTW -- and fairly rarely at that -- so I think there is no reason for us to care all that much about that corner case, as long as it does not break correctness. Current code just creates the noise in testing, so we are fixing that noise.

The point I'm trying to make is `Compile::inline_incrementally_one()` assumes `_late_inlines` is not empty. Both callers (`Compile::inline_incrementally()` and `Compile::process_late_inline_calls_no_inline()`) do have `_late_inlines.length() > 0` guards, but it seems it doesn't hold when `PhaseIdealLoop` removes remaining elements from `_late_inlines`. 

The behavior is counter-intuitive and can cause other surprises later. Instead, I suggest to add ` if (_late_inlines.length() == 0) return;` in `Compile::inline_incrementally()` before calling into `inline_incrementally_one()`.

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

PR Comment: https://git.openjdk.org/jdk/pull/29171#issuecomment-3774617706


More information about the hotspot-dev mailing list