[lworld] RFR: 8368002: [lworld] Crash in ThawBase::remove_top_compiled_frame_from_chunk [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Mon Sep 22 17:22:51 UTC 2025


On Sat, 20 Sep 2025 14:31:03 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> 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 2075:
> 
>> 2073: }
>> 2074: 
>> 2075: int ThawBase::remove_scalarized_frames(StackChunkFrameStream<ChunkFrames::CompiledOnly>& f, stackChunkOop chunk, int frames_size, int &argsize) {
> 
> Thanks for explaining this change to me.  I think this parameter is confusing.  It's the incoming frame_size from the stub frame, and this adds in all the frame sizes from the frames that need a stack repair.
> It might make more sense to me to distinguish these things, have the parameter be "stub_frame_size" or "top_frame_size" and to have a local to accumulate the visited frames sizes like:
> int frames_size = stub_frame_size;

I removed that parameter altogether. I realized we can remove all the duplicated code in `remove_scalarized_frames()`, so that the method just returns the size of all the frames removed. Then for the stub case, we add this value to the size of the stub frame. For the non-stub case, this returned value is the final size.

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

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


More information about the valhalla-dev mailing list