vfprintf() has a 4096-byte memory leak?

Ryan T. Dean rtdean at cytherianage.net
Sat Aug 2 04:13:22 PDT 2003


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



More information about the freebsd-current mailing list