This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: Reference counting bug in ld-linux.so.2 (2.1.2, 2.1.3, 2.1.9x, et. al.)


"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.

glibc-2.0.7-dl.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]