This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/18778] ld.so crashes if failed dlopen causes libpthread to be forced unloaded
- From: "schwab at linux-m68k dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 06 Aug 2015 17:09:28 +0000
- Subject: [Bug dynamic-link/18778] ld.so crashes if failed dlopen causes libpthread to be forced unloaded
- Auto-submitted: auto-generated
- References: <bug-18778-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18778
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
diff --git a/elf/tst-nodelete.cc b/elf/tst-nodelete.cc
index 176cb68..24bb4c0 100644
--- a/elf/tst-nodelete.cc
+++ b/elf/tst-nodelete.cc
@@ -1,12 +1,15 @@
#include "../dlfcn/dlfcn.h"
#include <stdio.h>
#include <stdlib.h>
+#include <gnu/lib-names.h>
static int
do_test (void)
{
int result = 0;
+ void *pthread = dlopen (LIBPTHREAD_SO, RTLD_LAZY);
+
/* This is a test for correct handling of dlopen failures for library that
is loaded with RTLD_NODELETE flag. The first dlopen should fail because
of undefined symbols in shared library. The second dlopen then verifies
@@ -18,6 +21,9 @@ do_test (void)
result = 1;
}
+ if (pthread)
+ dlclose (pthread);
+
/* This is a test for correct handling of dlopen failures for library that
is linked with '-z nodelete' option and hence has DF_1_NODELETE flag.
The first dlopen should fail because of undefined symbols in shared
--
You are receiving this mail because:
You are on the CC list for the bug.