Date: Sat, 2 Aug 2003 09:18:52 +0000 (GMT) From: "Ryan T.Dean" <rtdean@cytherianage.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: rwatson@FreeBSD.org Subject: misc/55181: Memory leak in vfprintf() Message-ID: <20030802091853.748A643FA3@mx1.FreeBSD.org> Resent-Message-ID: <200308020920.h729K5I2054285@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 55181 >Category: misc >Synopsis: Memory leak in vfprintf() >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 02 02:20:04 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Ryan T. Dean >Release: FreeBSD 5.1-CURRENT i386 >Organization: <organization of PR author (multiple lines)> >Environment: Under -CURRENT: System: FreeBSD glyph.cytherianage.net 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Jul 30 16:43:52 EDT 2003 root@glyph.cytherianage.net:/usr/obj/usr/src/sys/GLYPH i386 Under -STABLE: System: FreeBSD tonberi.cytherianage.net 4.8-STABLE FreeBSD 4.8-STABLE #2: Tue Jul 29 20:46:05 EDT 2003 root@tonberi.cytherianage.net:/usr/obj/usr/src/sys/TONBERI i386 >Description: A 4096-byte memory leak appears to exist in the FreeBSD libc, involving the stdio functions. More specifically, the memory is allocated on a call to printf(), which in turn calls vfprintf(). The memory is subsequently never freed. I have observed this behaviour on -CURRENT as of the 30th of July, and on -STABLE as of the 29th of July. It was also reported, indirectly, on the FreeBSD ports mailing list on the 21st of July. It has been observed using dmalloc (devel/dmalloc; dmalloc.com) and NJAMD (sourceforge.net/projects/njamd). I suspect this problem may also occur in vsprintf() as well. I have CC'd rwatson@freebsd.org because a 'make -V MAINTAINER' in src/lib/libc returned his email address. I apologize if this was / is in error. >How-To-Repeat: Compile any program that uses vfprintf, and observe it through a memory debugger. On the first call to vfprintf(), a 4096-byte chunk of memory will be allocated. It will never be freed. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030802091853.748A643FA3>