From owner-freebsd-current@FreeBSD.ORG Sat Aug 2 04:13:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD8F237B401 for ; Sat, 2 Aug 2003 04:13:21 -0700 (PDT) Received: from mtiwmhc12.worldnet.att.net (mtiwmhc12.worldnet.att.net [204.127.131.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08D6A43FCB for ; Sat, 2 Aug 2003 04:13:17 -0700 (PDT) (envelope-from rtdean@cytherianage.net) Received: from mahasamatman.internal.cytherianage.net (96.washington-09rh15rt.dc.dial-access.att.net[12.91.120.96]) by mtiwmhc12.worldnet.att.net (mtiwmhc12) with SMTP id <2003080211131411200loeune>; Sat, 2 Aug 2003 11:13:15 +0000 Received: (qmail 428 invoked from network); 2 Aug 2003 11:13:13 -0000 Received: from glyph.internal.cytherianage.net (HELO cytherianage.net) (192.168.177.42) by mahasamatman.internal.cytherianage.net with SMTP; 2 Aug 2003 11:13:13 -0000 Message-ID: <3F2B9C59.3060209@cytherianage.net> Date: Sat, 02 Aug 2003 07:11:21 -0400 From: "Ryan T. Dean" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5a) Gecko/20030730 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: vfprintf() has a 4096-byte memory leak? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2003 11:13:22 -0000 Hey all- I was doing some app debugging tonight, and noticed what appears to be a memory leak in vfprintf(). I've tested it on -CURRENT and -STABLE; any program that makes use of vfprintf() (ie, uses printf) appears to have a 4096 byte memory leak. The memory is allocated on the first vfprintf() call and is never deallocated. I've observed the memory leak on -CURRENT as of 30 Jul and -STABLE as of 29 Jul. It was also reported, indirectly, on ports@ on 21 Jul. The memory leak has been observed using dmalloc (devel/dmalloc; dmalloc.com) and NJAMD (sourceforge.net/projects/njamd). I suspect that there may be a similar leak in vsprintf() as well. I did file a PR (misc/55181), but I thought I should maybe give a shout-out to the list as well. -Ryan T. Dean