Bug 3248 - unportable sigprocmask() in gai_misc.h
Summary: unportable sigprocmask() in gai_misc.h
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: linuxthreads (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: drow@false.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-22 19:46 UTC by Petr.Salinger
Modified: 2018-04-20 14:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
proposed patch (383 bytes, patch)
2006-09-22 19:47 UTC, Petr.Salinger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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