This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix crash in __longjmp on hppa architecture (BZ #21049)
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Helge Deller <deller at gmx dot de>
- Cc: libc-alpha at sourceware dot org, Carlos O'Donell <carlos at redhat dot com>, Mike Frysinger <vapier at gentoo dot org>, Aurelien Jarno <aurelien at aurel32 dot net>, John David Anglin <danglin at gcc dot gnu dot org>
- Date: Sun, 26 Mar 2017 09:50:48 +0200
- Subject: Re: [PATCH] Fix crash in __longjmp on hppa architecture (BZ #21049)
- Authentication-results: sourceware.org; auth=none
- References: <20170115123629.GA12030@ls3530>
* 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.)