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

Goetz Lindenmaier goetz at openjdk.org
Wed Jan 14 16:43:56 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)

Hi Roland, 

if the backport only has internal demand, just bring it to your internal VM.
Please give a reason why this is important for OpenJDK.

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

PR Comment: https://git.openjdk.org/jdk25u-dev/pull/144#issuecomment-3750463591


More information about the jdk-updates-dev mailing list