[PATCH] sigaltstack bad behavior on powerpc64

Laurent MEYER meyerlau at fr.ibm.com
Mon Mar 27 20:37:41 EST 2006


Hello,

I may have found a bug in powerpc64 arch specific code.

*) When setting a sighandler using sigaction() call, if the flag
SA_ONSTACK is set and no alternate stack is provided via sigaltstack(),
the kernel still try to install the alternate stack. This behavior is
the opposite of the one which is documented in Single Unix
Specifications V3.

*) Also when setting an alternate stack using sigaltstack() with the flag SS_DISABLE, 
the kernel try to install the alternate stack on signal delivery.

These two use cases makes the process crash at signal delivery.

I wrote a small patch to add a condition in get_sigframe().

Hope that is relevant and helpfull.

Regards,
Laurent MEYER.

Signed-off-by: Laurent Meyer <meyerlau at fr.ibm.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigaltstack.fix.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060327/514cc258/attachment.bin>


More information about the Linuxppc-dev mailing list