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/19810] dlopen with both RTLD_NOLOAD and RTLD_NODELETE causes a segmentation fault


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

--- 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  ead3cea7d8948113fe205243acbddbda609de5c9 (commit)
      from  6b75ba1388bff6a81bad410d7318d385a043b3cb (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=ead3cea7d8948113fe205243acbddbda609de5c9

commit ead3cea7d8948113fe205243acbddbda609de5c9
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Sat Sep 3 20:25:59 2016 +0200

    Set NODELETE flag after checking for NULL pointer

    The commit b632bdd3 moved the setting of the DF_1_NODELETE flag earlier
    in the dl_open_worker function. However when calling dlopen with both
    RTLD_NODELETE and RTLD_NOLOAD, the pointer returned by _dl_map_object is
    NULL. This condition is checked just after setting the flag, while it
    should be done before. Fix that.

    Changelog:
        [BZ #19810]
        * elf/dl-open.c (dl_open_worker): Set DF_1_NODELETE flag later.
        * elf/tst-noload.c: New test case.
        * elf/Makefile (tests): Add tst-noload.

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

Summary of changes:
 ChangeLog                                        |    7 +++
 elf/Makefile                                     |    3 +-
 elf/dl-open.c                                    |   12 +++---
 stdio-common/tst-fmemopen4.c => elf/tst-noload.c |   52 +++++++++++----------
 4 files changed, 42 insertions(+), 32 deletions(-)
 copy stdio-common/tst-fmemopen4.c => elf/tst-noload.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]