Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: linux/arm64 sigtramp seems wrong #31827
As I understand it:
darwin/arm64 runtime.sigtramp saves callee-saved registers (r19-r27, g aka r28, r29) for this scenario
linux/arm64 sigtramp does not do this.
I don't have a reproducer for this bug (or a setup for it), but it seems wrong.
I doubt there is really need to save/restore the registers in
I think the question should be: Why we save/restore those registers on darwin system? Is it necessary?
@ianlancetaylor - I don't see why this would be necessary. When a signal is delivered the kernel preserves all of the register state in the trap frame, restoring all of the (possibly modified) register state on return from the signal handler. In the case of OpenBSD/arm64, see
This is fairly standard behaviour - NetBSD is effectively the same via
I would expect Linux to do the same.