public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/15160] New: memusagestat crashes with FPE with programs that don't use malloc
@ 2013-02-19 13:47 siddhesh at redhat dot com
  2013-02-19 13:48 ` [Bug malloc/15160] " siddhesh at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: siddhesh at redhat dot com @ 2013-02-19 13:47 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 15160
           Summary: memusagestat crashes with FPE with programs that don't
                    use malloc
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: malloc
        AssignedTo: siddhesh@redhat.com
        ReportedBy: siddhesh@redhat.com
    Classification: Unclassified


For programs that don't use malloc, memusage generates statistics with 0
maxheap_size, which results in a divide-by-zero FPE when it tries to generate
the graph image.

Steps to reproduce:

$ cat > foo.c
#include <stdio.h>

int main (int argc, char **argv)
{
  int i;

  for (i = 0; i < 10000; i++)
    puts (argv[0]);
  return 0;
}
^D

$ gcc foo.c

$ LD_PRELOAD=/glibc-build/malloc/libmemusage.so \
MEMUSAGE_OUTPUT=/tmp/memusage.TSY4YO ./a.out

/glibc-build/malloc/memusagestat /tmp/memusage.TSY4YO x.png

Actual Result:

Floating point exception

Expected Result:

Graph showing 0 utilization for dynamic memory allocation and actual stack
utilization.

-- 
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] 4+ messages in thread

end of thread, other threads:[~2014-06-13 18:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-19 13:47 [Bug malloc/15160] New: memusagestat crashes with FPE with programs that don't use malloc siddhesh at redhat dot com
2013-02-19 13:48 ` [Bug malloc/15160] " siddhesh at redhat dot com
2013-02-26  8:57 ` siddhesh at redhat dot com
2014-06-13 18:48 ` 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).