Date: Sat, 8 Aug 1998 02:08:23 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: jb@cimlogic.com.au (John Birrell) Cc: archie@whistle.com, jb@cimlogic.com.au, freebsd-current@FreeBSD.ORG, bde@zeta.org.au, wollman@khavrinen.lcs.mit.edu, dg@root.com Subject: Re: memory leaks in libc Message-ID: <199808080208.TAA20796@usr01.primenet.com> In-Reply-To: <199808072135.HAA10923@cimlogic.com.au> from "John Birrell" at Aug 8, 98 07:35:32 am
next in thread | previous in thread | raw e-mail | index | archive | help
> FWIW, I think that any proposed changes to libc should be _required_ to > be thread-safe from now on so that libc has a better chance of working > with kernel threads. I have sent copies of excerpts of the CAE and SUS specifications to the most interested (vocal) parties. Here are the salient points, and then can we let this die like Poul suggested? According to the standards: 1) People are permitted to muck about in environ. 2) putenv( "foo=fee"); followed by putenv("foo=xyz") is REQUIRED to free the allocations; in other words, not leak. 3) getenv() is permitted to use a local static buffer. Thus depending on getting a pointer to the real variable is not a valid thing to do. 4) Conforming POSIX threading programs are required to implement synchronization between threads accessing getenv/putenv and/or using environ to much things around. 5) Neither getenv() or putenv() are required to be reentrant. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808080208.TAA20796>