Subject: Re: CVS commit: src/lib/libpthread
To: YAMAMOTO Takashi <>
From: Valeriy E. Ushakov <>
List: source-changes
Date: 11/20/2003 19:38:51
On Thu, Nov 20, 2003 at 15:46:42 +0000, YAMAMOTO Takashi wrote:

> Module Name:	src
> Committed By:	yamt
> Date:		Thu Nov 20 15:46:42 UTC 2003
> Modified Files:
> 	src/lib/libpthread: pthread_sig.c
> Log Message:
> pthread__deliver_signal: swap oldmask and siginfo so that signal
> handler's stack doesn't stomp siginfo.
> this also fixes !__HAVE_SIGINFO, in that case
> pthread__signal_tramp assumes uc->uc_stack.ss_sp points the old
> signal mask.
> pointed by uwe@.

Uh... I probably don't understand this code fully, but consider that
the uc is on the stack right above (lower addresses) the sigset_t
pointed to by maskp.  So if you set ss_sp in the uc to maskp and if
the platform passes arguments via stack, makecontext will write them
at the end of uc (above ss_sp = maskp).  We probably get away with
this because of the PAD in the ucontext.

SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen