Reference counting bug in ld-linux.so.2 (2.1.2, 2.1.3, 2.1.9x, et. al.)
Philippe Troin
phil@fifi.org
Sat Oct 21 12:38:00 GMT 2000
"Allen Bauer" <kylix_rd@hotmail.com> writes:
> > On Thu, Oct 19, 2000 at 11:32:10AM -0700, Ulrich Drepper wrote:
> > > "H . J . Lu" <hjl@lucon.org> writes:
> > >
> > > > I don't think they are the same list. One is map->l_initfini and
> > > > the other is map->l_searchlist.r_list. Ulrich, are they the same list?
> > >
> > > I will look at this when I have the time.
> > >
> >
> > Here is a testcase based on Allen's report.
>
> I've done some more extensive testing and have found that it looks like this
> patch introduces the opposite problem.
I had this fixed a long time ago in an old glibc version, and it
boiled down to have to maintain a l_dlopencount separate from the
l_opencount... Attached is the patch against 2.0.7, so it will
probably not apply cleanly, if at all, but it might be
inspirational...
I found these issues while dealing with a project where more than 50
shared libraries where dlopen()'ing each other and dlclose()'ing in
seemingly random order...
The patch got rejected at that time (AFAIR), and I was too busy to
clean it up, and it got out of my mind...
I also got some test cases which were showing the issues, let me try
find them out...
Phil.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-2.0.7-dl.patch
Type: text/x-diff
Size: 11267 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20001021/206606ac/attachment.bin>
More information about the Libc-alpha
mailing list