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/20500] dlopen of libpthread in static executable crashes


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

--- Comment #5 from ma.jiang at zte dot com.cn ---
Hi, all
  I think this bug is not just about nss, it's more serious. A shared library
dlopened by static executables could depend on libpthread. The writer of this
shared library did nothing wrong, neither did the user of the library(who
dlopen the library in a static executable). But the final program just can not
act as expected because of this bug. 
  Generally speaking, the dlopened shared libraries and the static executable
should be isolated from each other. The main executable use dlsym to access the
functions provided by the shared libraries. Glibc currently support this usage,
so we should try to make things right.
  In fact, there have been dl-static.c which provided a standard way to
initialize variables in the dynamic linker ld.so. Unfortunately, this file
currently just initialize the dl_pagesize. More over, many main stream
architectures(such as arm/x86) did not even implement this file. 
  To fix this bug , I have unified dl-static.c, and added some lines to
initialize GL(dl_error_catch_tsd). See the attached patch for more details.
Hope this local fix could go upstream.

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