Subject: possible issue of sigcontext alignment on user stack
To: None <port-mips@netbsd.org>
From: Toru Nishimura <locore32@gaea.ocn.ne.jp>
List: port-mips
Date: 11/09/2002 21:15:44
Hi, guys.
I think there is a possible structure alignment issue around
sigcontext store built on user stack
In sendsig()::sig_machdep.c, the pointer value "struct
sigcontext *scp" made from cast is wind up "scp--" to
have sigcontext structure storage. Then, structure alignment
would matter in the case of 64bit register_t.
scp--;
I guess the above should be like as;
scp = (struct sigcontext *)(((unsigned long)(scp - 1)) &~ ALIGNBYTES);
Your thoughts? Donno what the most sane cast should be for LP64 case.
Toru Nishimura/ALKYL Technology