This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/22635] pthread_self returns NULL before libpthread is loaded


https://sourceware.org/bugzilla/show_bug.cgi?id=22635

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  8a26ad2ab7396bc94fd3cd7b25cba433908d30e1 (commit)
      from  5069ff32842c60c55f8b573ee66fe43f9ec364af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a26ad2ab7396bc94fd3cd7b25cba433908d30e1

commit 8a26ad2ab7396bc94fd3cd7b25cba433908d30e1
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Dec 20 11:40:36 2017 +0100

    nptl: Implement pthread_self in libc.so [BZ #22635]

    All binaries use TLS and thus need a properly set up TCB, so we can
    simply return its address directly, instead of forwarding to the
    libpthread implementation from libc.

    For versioned symbols, the dynamic linker checks that the soname matches
    the name supplied by the link editor, so a compatibility symbol in
    libpthread is needed.

    To avoid linking against the libpthread function in all cases, we would
    have to bump the symbol version of libpthread in libc.so and supply a
    compat symbol.  This commit does not do that because the function
    implementation is so small, so the overhead by two active copies of the
    same function might well be smaller than the increase in symbol table
    size.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   15 +++++++++++++++
 nptl/Makefile                                      |    4 ++--
 .../compat-pthread_self.c                          |   20 ++++++++------------
 nptl/forward.c                                     |    4 ----
 nptl/nptl-init.c                                   |    1 -
 nptl/pthread_self.c                                |    4 +---
 sysdeps/nptl/pthread-functions.h                   |    1 -
 7 files changed, 26 insertions(+), 23 deletions(-)
 copy sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf-ppc64.S =>
nptl/compat-pthread_self.c (71%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]