akirilov-arm opened PR #4851 from get_return_address
to main
:
The previous implementation assumed that nothing had clobbered the LR register since the current function had started executing, so it would be incorrect for a non-leaf function, for example, that contains the
get_return_address
operation right after a call. The operation is valid only if thepreserve_frame_pointers
flag is enabled, which implies that the presence of a frame record on the stack is guaranteed.
cfallin created PR review comment:
Can we add a comment here describing the reload? I think this is so that we know that
LR
is in a consistent state (the original signed return address), even if anotherget_return_address
op had already been executed; is that right? And then it's safe to clobber below withxpaclri
becausepreserve_frame_pointers
implies thatLR
will be reloaded before return?
cfallin submitted PR review.
cfallin submitted PR review.
akirilov-arm updated PR #4851 from get_return_address
to main
.
akirilov-arm created PR review comment:
Actually the main issue is not other
get_return_address
operations, but rather function calls - I added the documentation.
akirilov-arm submitted PR review.
cfallin submitted PR review.
cfallin merged PR #4851.
Last updated: Dec 23 2024 at 12:05 UTC