public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/26215] New: printf_fp memory leak
@ 2020-07-07 23:06 jsm28 at gcc dot gnu.org
  2020-07-09 21:54 ` [Bug stdio/26215] " jsm28 at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2020-07-07 23:06 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26215

            Bug ID: 26215
           Summary: printf_fp memory leak
           Product: glibc
           Version: 2.32
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

__printf_fp_l has a memory leak in the case of some I/O errors, where both
buffer and wbuffer have been malloced but the handling of I/O errors only frees
wbuffer. The following test illustrates this.

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>

int
main (void)
{
  mtrace ();
  FILE *fp;
  if ((fp = fopen ("/dev/full", "w")) == NULL)
    exit (1);
  fprintf (fp, "%.65536f", 1.0);
  fclose (fp);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-09 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 23:06 [Bug stdio/26215] New: printf_fp memory leak jsm28 at gcc dot gnu.org
2020-07-09 21:54 ` [Bug stdio/26215] " jsm28 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).