This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


* 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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]