public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/14981] New: mtrace realloc
@ 2012-12-22 15:02 joost.vandevondele at mat dot ethz.ch
  2012-12-22 15:03 ` [Bug malloc/14981] " joost.vandevondele at mat dot ethz.ch
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: joost.vandevondele at mat dot ethz.ch @ 2012-12-22 15:02 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14981

             Bug #: 14981
           Summary: mtrace realloc
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: malloc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: joost.vandevondele@mat.ethz.ch
    Classification: Unclassified


The following program causes mtrace.pl to report memory leaks.

> cat test.c
void main()
{ 
  int* i;
  mtrace();
  i=malloc(sizeof(int));
  i=realloc(i,0);
  muntrace();
} 

mtrace ./t.dat 

Memory not freed:
-----------------
           Address     Size     Caller
0x0000000000a96460      0x4  at 0x400678

It looks like mtrace.pl is not considering realloc(x,0) equivalent to a free.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-06-14  5:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-22 15:02 [Bug malloc/14981] New: mtrace realloc joost.vandevondele at mat dot ethz.ch
2012-12-22 15:03 ` [Bug malloc/14981] " joost.vandevondele at mat dot ethz.ch
2012-12-23  2:31 ` bugdal at aerifal dot cx
2012-12-23  8:36 ` schwab@linux-m68k.org
2012-12-23 16:31 ` joseph at codesourcery dot com
2013-01-03 10:21 ` schwab@linux-m68k.org
2014-02-16 17:50 ` jackie.rosen at hushmail dot com
2014-05-28 19:41 ` schwab at sourceware dot org
2014-06-14  5:30 ` fweimer at redhat dot com

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).