Bug 3248

Summary: unportable sigprocmask() in gai_misc.h
Product: glibc Reporter: Petr.Salinger
Component: linuxthreadsAssignee: drow <drow>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: proposed patch

Description Petr.Salinger 2006-09-22 19:46:47 UTC
Hi,

please, could in just added gai_misc.h use __sigprocmask instead
of direct using Linux syscalls ? For linuxthreads add-on on  Linux it is equal,
but on GNU/kFreeBSD  syscall rt_sigprocmask really does not exist.

Many thanks

    Petr

2006-09-22  Petr Salinger  <Petr.Salinger@seznam..cz>

	* sysdeps/pthread/gai_misc.h: use __sigprocmask()
Comment 1 Petr.Salinger 2006-09-22 19:47:42 UTC
Created attachment 1317 [details]
proposed patch
Comment 2 Daniel Jacobowitz 2006-10-01 04:06:35 UTC
Sure; I've checked that in, with minor formatting fixes.  Thanks for the patch.
Comment 3 Daniel Jacobowitz 2006-10-02 18:24:42 UTC
Petr, had you tested that patch?  I didn't - egg on my face.  It breaks the build.
Comment 4 Daniel Jacobowitz 2006-10-02 18:42:34 UTC
I've fixed it.
Comment 5 Petr.Salinger 2006-10-02 19:31:40 UTC
(In reply to comment #3)

> Petr, had you tested that patch?  I didn't - egg on my face. 
>  It breaks the build.

Yes, for kfreebsd-i386.
It have worked fine and testsuite have passsed reasonably.
Test have been against snapshot from 2006-09-18, with gai_misc.h added.

May be make didn't catch all changes correctly (I have tested iteratively also
changes to our sysdeps for upcoming glibc 2.5) or it works for  kfreebsd but not
for Linux .

Sorry for the problem and many thanks for fixing it again.

Petr
Comment 6 drow@false.org 2006-10-02 19:35:55 UTC
Subject: Re:  unportable sigprocmask() in gai_misc.h

On Mon, Oct 02, 2006 at 07:31:40PM -0000, Petr dot Salinger at seznam dot cz wrote:
> May be make didn't catch all changes correctly (I have tested iteratively also
> changes to our sysdeps for upcoming glibc 2.5) or it works for  kfreebsd but not
> for Linux .

Do you not have symbol versioning on that platform?  __sigprocmask is
not exported from libc.so nor normally present in libpthread.so.

Comment 7 Petr.Salinger 2006-10-02 20:47:48 UTC
> Do you not have symbol versioning on that platform?  

We have symbol versioning.

> __sigprocmask is not exported from libc.so nor normally present in libpthread.so.

You got it. 

We export  __sigprocmask in version GLIBC_PRIVATE as  __sigprocmask is used
internally in libpthread during emulation of clone syscall.
So our libc.so exports it, but Linux's don't.

Again sorry for the problem.

Petr