This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/15160] New: memusagestat crashes with FPE with programs that don't use malloc
- From: "siddhesh at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 19 Feb 2013 13:47:31 +0000
- Subject: [Bug malloc/15160] New: memusagestat crashes with FPE with programs that don't use malloc
- Auto-submitted: auto-generated
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.