This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH][alpha] Fix ____longjmp_chk
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: Aurelien Jarno <aurelien at aurel32 dot net>, libc-ports at sourceware dot org, libc-alpha at sourceware dot org
- Date: Tue, 22 Mar 2011 21:58:51 +0100
- Subject: Re: [PATCH][alpha] Fix ____longjmp_chk
- References: <20110319122929.GA12598@volta.aurel32.net> <4D88F442.2070702@twiddle.net>
You can use the various C implementations of ____longjmp_chk as a model,
they are known working. The point of the test is to look whether
longjmp jumps back to a stack frame that is already left, ie. the
function containing setjmp has already returned. It does not (and
cannot) check whether longjmp jumps to some random frame that may be
part of a different thread's stack, for example. The sigaltstack check
is needed to allow jumping out of a signal frame on the alternate signal
stack.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."