libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] question about x86 portability issues


From: Dave Watson
Subject: Re: [Libunwind-devel] question about x86 portability issues
Date: Mon, 17 Apr 2017 09:18:32 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On 04/17/17 05:10 PM, Waldemar Brodkorb wrote:
> Hi developers,
> 
> with Buildroot we have some compile issues when using uClibc-ng or
> musl toolchains. The reason is the x86 specific code is using 
> deprecated sigreturn and setcontext functions.
> 
> With the attached patch I could compile libunwind with the uClibc-ng
> toolchain.
> 
> But the best solution would be if the code would use a direct
> syscall to rt_sigreturn as the x86_64 code does:
> http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86_64/Gos-linux.c;h=6f70d3ffdb1e514a567d0c2146c852765bda953d;hb=HEAD#l148
> 
> What do you think?
> 
> I think sigreturn() is a noop in GNU C Library for x86 and x86_64.

The attached patch won't work - unw_getcontext/setcontext functions
don't save/restore the signal mask.  Normally we don't need to, except
for signal return functions - which sigreturn does for us using the
sigmask saved by the kernel.

I agree the best fix would probably be to call the syscall directly as
in the x86_64.  Want to provide a patch to do that?

Thanks



reply via email to

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