From owner-freebsd-audit Mon Aug 19 10:25:47 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 418A937B400; Mon, 19 Aug 2002 10:25:43 -0700 (PDT) Received: from baraca.united.net.ua (ns.united.net.ua [193.111.8.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9041143E42; Mon, 19 Aug 2002 10:25:41 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from vega.vega.com (xDSL-2-2.united.net.ua [193.111.9.226] (may be forged)) by baraca.united.net.ua (8.11.6/8.11.6) with ESMTP id g7JHPHZ34061; Mon, 19 Aug 2002 20:25:17 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vega.vega.com (8.12.5/8.12.5) with ESMTP id g7JHPBYR053378; Mon, 19 Aug 2002 20:25:11 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3D612A34.BCB0B949@FreeBSD.org> Date: Mon, 19 Aug 2002 20:26:12 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,uk,ru MIME-Version: 1.0 To: Terry Lambert Cc: hackers@FreeBSD.org, audit@FreeBSD.org, Alexander Litvin , Andriy Gapon Subject: Re: Thread-safe resolver [patches for review] 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> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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