[PATCH] Fix crash in __longjmp on hppa architecture (BZ #21049)

Florian Weimer fw@deneb.enyo.de
Sun Mar 26 07:51:00 GMT 2017


* Helge Deller:

> This fixes a crash in __longjmp on the hppa architecture which
> happens if the new sigaltstack is above the current stack. In that
> case CHECK_SP() does an INTERNAL_SYSCALL which clobbers %r26. Fix
> this issue by calling CHECK_SP before assigning the local register
> variables r26 and r25.

I agree this is the right thing to do because of INTERNAL_SYSCALL uses
%r26 as an input operand, so GCC is not required to preserve the %r26
contents there.  I think the assumption on the GCC side is that if the
programmer requires explicit registers, they know what they are doing.
(Otherwise, GCC is expected to avoid registers assigned to register
variables.)



More information about the Libc-alpha mailing list