[jdk25u-dev] Integrated: 8372591: assert(!current->cont_fastpath() || freeze.check_valid_fast_path()) failed

Roland Mesde duke at openjdk.org
Mon Jan 26 15:39:11 UTC 2026


On Tue, 13 Jan 2026 19:47:29 GMT, Roland Mesde <duke at openjdk.org> wrote:

> Backporting JDK-8372591: assert(!current->cont_fastpath() || freeze.check_valid_fast_path()) failed.
> 
> This PR fixes a critical bug in OSR (On-Stack Replacement) handling with continuations where _cont_fastpath is incorrectly set when an OSR frame has an interpreted caller. The issue occurs because OSR frames are created from the sender's unextended_sp (not sp), but _cont_fastpath was being set to the sender's sp, potentially pointing outside valid stack space.
> 
> This mismatch can cause _cont_fastpath to be prematurely cleared while interpreted frames remain on the stack, leading to incorrect execution of the freeze fast path (which should only run when all frames are compiled) and resulting in crashes.
> 
> The fix changes OSR_migration_begin to use the sender's unextended_sp for _cont_fastpath, ensuring proper stack boundary tracking.
> 
> This backport has internal demand.
> 
> Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
> 
> make test TEST=test/jdk/jdk/internal/vm
> 
> Results attached:
> 
> [linux-aarch64-specific-test.log](https://github.com/user-attachments/files/24616553/linux-aarch64-specific-test.log)
> [linux-x64-specific-test.log](https://github.com/user-attachments/files/24616554/linux-x64-specific-test.log)
> [macos-aarch64-specific-test.log](https://github.com/user-attachments/files/24616555/macos-aarch64-specific-test.log)
> [windows-x64-specific-test.log](https://github.com/user-attachments/files/24616556/windows-x64-specific-test.log)

This pull request has now been integrated.

Changeset: 948dd844
Author:    Roland Mesde <mesde at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk25u-dev/commit/948dd844385650c2e9a91b3c5a9719c396e5714b
Stats:     91 lines in 2 files changed: 90 ins; 0 del; 1 mod

8372591: assert(!current->cont_fastpath() || freeze.check_valid_fast_path()) failed

Backport-of: 5fd095fb9b8f1d2000760519d42d7d0068b82651

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

PR: https://git.openjdk.org/jdk25u-dev/pull/144


More information about the jdk-updates-dev mailing list