[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Eliminating the sigprocmask system call

From: Arun Sharma
Subject: Re: [Libunwind-devel] Eliminating the sigprocmask system call
Date: Fri, 6 Jun 2008 10:34:01 -0700

On Thu, Jun 5, 2008 at 9:31 AM, David Mosberger-Tang <address@hidden> wrote:

>  However, for callers who just want to examine the stack, this could
>  potentially be eliminated. Currently there is no way for the caller to
>  express the intent at unw_getcontext() time. Looking at some of the
>  other archs which have a hand coded getcontext.S (ia64, arm etc) - I
>  don't see any calls to sigprocmask. Does this mean that
>  Ltest-resume-sig is failing on those archs?

I don't know about ARM, but I have never seen Ltest-resume-sig fail on
ia64 and I don't think it should.

The test seems to be relying on unw_resume/sigreturn unmasking all signals except for an arch specific _BLOCKABLE set. This set doesn't seem to be documented in any man page. But looking at the kernel sources:

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

On x86_64, glibc  doesn't expose sigreturn. So the correct fix seems to be to modify setcontext.S to mimic the kernel behavior. Seems reasonable?

Paul Pluznikov sent me a patch to implement x86_64 specific getcontext that gets rid of the call to sigprocmask. I'll post it later today.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]