On Mon, 22 Sep 2025 17:22:48 GMT, Patricio Chilano Mateo 
<[email protected]> wrote:

>> Please review this small fix. When thawing in the fast path, the top frame 
>> could be a runtime stub due to preempting on monitorenter. In the changes 
>> for JDK-8336845 I missed this, leading to a crash when dereferencing the 
>> nullptr returned by `f.cb()->as_nmethod_or_null()` in 
>> `ThawBase::remove_top_compiled_frame_from_chunk`.
>> 
>> I was able to reproduce the failure locally and verified it is now fixed. I 
>> did run into a pre-existing crash with Jetty (filed JDK-8368099). I also run 
>> all tests in java/lang/Thread/virtual stressing this path, tests Fuzz.java 
>> and TestVirtualThreads.java, plus extra mach5 tier testing.
>> 
>> Thanks,
>> Patricio
>
> Patricio Chilano Mateo has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   remove frames_size parameter and code duplication from 
> remove_scalarized_frames

src/hotspot/share/runtime/continuationFreezeThaw.cpp line 2076:

> 2074: 
> 2075: int 
> ThawBase::remove_scalarized_frames(StackChunkFrameStream<ChunkFrames::CompiledOnly>&
>  f, stackChunkOop chunk, int &argsize) {
> 2076:   DEBUG_ONLY(intptr_t* const chunk_sp = chunk->start_address() + 
> chunk->sp();)

Can you remove the 'chunk' parameter too?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1603#discussion_r2369700392

Reply via email to