Date: Thu, 19 Jun 2003 22:33:47 -0400 From: Mike Makonnen <mtm@identd.net> To: Andriy Gapon <agapon@cv-nj.com> Cc: threads@freebsd.org Subject: Re: Removal of bogus gethostbyaddr_r() Message-ID: <20030620023348.PAID20810.pop015.verizon.net@kokeb.ambesa.net> In-Reply-To: <3EF2660A.1040508@cv-nj.com> References: <3EF2660A.1040508@cv-nj.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Jun 2003 21:40:26 -0400 Andriy Gapon <agapon@cv-nj.com> wrote: > > Btw, what happened to the patch(es) proposed by Maxim Sobolev: > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=13028+0+archive/2002/freebsd-audit/20020818.freebsd-audit > > and in Problem Report bin/29581: > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/29581 > > the discussion in the mailing lists seems to have resulted in nothing, and the > problem seemed to be of non-unsolvable kind. I am not so sure that using pthreads thread local storage is such a good idea for a couple of reasons: 1. There is a finite amount of keys that an application can have open at any one time (PTHREAD_KEYS_MAX). On FreeBSD this is 256. So, every key we create is one less the application can use. This is really only a minor concern. Most applications don't use thread local storage and those that do don't usually need so many. 2. The order in which key destructors are called is not guaranteed. An application that uses pthreads thread local storage for its own reasons and calls one of the resolver routines from inside one of its destructors could get in trouble because the destructor for the resolver routines was called before its own. This would almost certainly lead to a memory leak in the application. However, these reservations are not show-stoppers since they can be easily mitigated by a mention in the appropriate man pages. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 mtm@FreeBSD.Org| FreeBSD - The Power To Serve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030620023348.PAID20810.pop015.verizon.net>