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 dynamic-link/18778] ld.so crashes if failed dlopen causes libpthread to be forced unloaded


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

--- Comment #6 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, gentoo/2.22 has been updated
       via  969fb008f467a27b7cf6cc3cb08f80a3072daf77 (commit)
       via  6f9b62ae8465ec6cb6561f309a2393899091f1c7 (commit)
      from  078cee5a65f59943e2d72e36ba6635d059c38426 (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=969fb008f467a27b7cf6cc3cb08f80a3072daf77

commit 969fb008f467a27b7cf6cc3cb08f80a3072daf77
Author: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
Date:   Mon Aug 10 10:47:54 2015 +0300

    Clear DF_1_NODELETE flag only for failed to load library.

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

    If dlopen fails to load an object that has triggered loading libpthread it
    causes ld.so to unload libpthread because its DF_1_NODELETE flags has been
    forcefully cleared. The next call to __rtdl_unlock_lock_recursive will
crash
    since pthread_mutex_unlock no longer exists.

    This patch moves l->l_flags_1 &= ~DF_1_NODELETE out of loop through all
loaded
    libraries and performs the action only on inconsistent one.

        [BZ #18778]
        * elf/Makefile (tests): Add Add tst-nodelete2.
        (modules-names): Add tst-nodelete2mod.
        (tst-nodelete2mod.so-no-z-defs): New.
        ($(objpfx)tst-nodelete2): Likewise.
        ($(objpfx)tst-nodelete2.out): Likewise.
        (LDFLAGS-tst-nodelete2): Likewise.
        * elf/dl-close.c (_dl_close_worker): Move DF_1_NODELETE clearing
        out of loop through all loaded libraries.
        * elf/tst-nodelete2.c: New file.
        * elf/tst-nodelete2mod.c: Likewise.

    (cherry picked from commit f25238ffe0455013174438376b3ee88df496f9d1)
    (cherry picked from commit a34d1c6afc86521d6ad17662a3b5362d8481514c)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6f9b62ae8465ec6cb6561f309a2393899091f1c7

commit 6f9b62ae8465ec6cb6561f309a2393899091f1c7
Author: Andreas Schwab <schwab@suse.de>
Date:   Mon Aug 10 14:12:47 2015 +0200

    Readd O_LARGEFILE flag for openat64 (bug 18781)

    (cherry picked from commit eb32b0d40308166c4d8f6330cc2958cb1e545075)
    (cherry picked from commit 561a9f11a974a447acb3dd03550a05df701a900e)

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

Summary of changes:
 elf/Makefile                                      |   11 +++++-
 elf/dl-close.c                                    |   15 ++++----
 elf/tst-nodelete2.c                               |   37 +++++++++++++++++++++
 elf/{tst-znodelete-zlib.cc => tst-nodelete2mod.c} |    3 +-
 io/test-lfs.c                                     |   21 +++++++++++-
 sysdeps/unix/sysv/linux/openat.c                  |    5 +++
 6 files changed, 81 insertions(+), 11 deletions(-)
 create mode 100644 elf/tst-nodelete2.c
 rename elf/{tst-znodelete-zlib.cc => tst-nodelete2mod.c} (50%)

-- 
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]