Date: Sat, 10 Oct 1998 08:00:02 -0700 (PDT) From: Jonathan Lemon <jlemon@americantv.com> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/8252: popen/pclose leaks Message-ID: <199810101500.IAA19320@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/8252; it has been noted by GNATS. From: Jonathan Lemon <jlemon@americantv.com> To: zerium@zerium.dyn.ml.org Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/8252: popen/pclose leaks Date: Sat, 10 Oct 1998 09:54:16 -0500 This is a problem in the interaction between vfork() and execl(). The new vfork semantics are such that the child uses the parent's address space, not COW. execl calls malloc() to build the correct argv vector to pass to execve. This malloc'ed area used to be thrown away after execve creates a new address space, but now hangs around in the parent's address space, creating a leak. Quick-n-dirty fix is to turn off fast vfork: sysctl -w kern.kern_vfork=0 A better fix would be to somehow release the malloc'd area on a call to execve(). -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810101500.IAA19320>