How is the preempt stub be like?
Patricio Chilano Mateo
patricio.chilano.mateo at oracle.com
Tue Jan 21 15:18:52 UTC 2025
Hi,
On 1/20/25 6:41 AM, xtex wrote:
> The comment says "fp restored from the stub would be invalid" when the current
> frame is frozen. I wonder if there are any documentation about how does the
> freezing process happen and why FP is invalid but FP and return address (RA)
> loaded from the address pointed by SP is still valid?
The FP value that was restored from the stub is invalid because it
contains a pointer to the stack that was created in the prologue before
freezing. But when we thaw the frame, it will most likely be copied at a
different memory address. The FP loaded from SP in the epilogue is the
original value from the compiled caller, and it never holds a pointer to
the stack unless PreserveFramePointer is used. In that latter case the
value would be fixed during the thaw operation (check use of
PreserveFramePointer).
Patricio
More information about the loom-dev
mailing list