Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2002 20:26:12 +0300
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        hackers@FreeBSD.org, audit@FreeBSD.org, Alexander Litvin <archer@whichever.org>, Andriy Gapon <agapon@excite.com>
Subject:   Re: Thread-safe resolver [patches for review]
Message-ID:  <3D612A34.BCB0B949@FreeBSD.org>
References:  <3D578A99.F0821712@FreeBSD.org> <3D5792CD.497C80F0@mindspring.com> <3D57A9D4.DAA043EF@FreeBSD.org> <3D57CF6D.2982CE8@mindspring.com> <3D58BFE8.9281433@FreeBSD.org> <3D58C359.A5F7B1AA@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> 
> [...]
> > > The assumption (which is potentially wrong) is that the program
> > > will correctly shut down all its threads, when in fact it was a
> > > module not under the programs control that created and used the
> > > threads.
> >
> > I do not quite agree. In such case, the module should probably have
> > destructor function, either placed into the fini section, or to be
> > explicitly called by the program before dlclose().
> 
> Uh, that's exactly the argument I was making: use a .fini section
> to clean up the per thread memory allocations.
> 8-).

I am not sure how you can get from a .fini section list of per-thread
dynamically allocated storages, without resorting to inspecting inner
implementation details of pthread_{set,get}specific(3). Any ideas?

-Maxim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D612A34.BCB0B949>