Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: core__dump@my-dejanews.com
Subject: Question on "Third Degree"
Date: 1999/01/05	[thread overview]
Message-ID: <76tf7p$bin$1@nnrp1.dejanews.com> (raw)

When I run Third Degree on a simple program that contains a call
to "fopen" on a Digital UNIX V4.0B  (Rev. 564) machine, Third Degree
reports a memory leak.

Here is the test program:


#include <stdio.h>
main()
{
   FILE *fd;
   if( (fd = fopen("test.txt","w")) == NULL) {
     perror("Error with fopen:");
     exit(1);
   }
   fclose(fd);
}



Commands I used to build and execute the test program:

cc -o testprog testprog.c
atom testprog -tool third -all
setenv LD_LIBRARY_PATH ./
testprog.third


Here is the contents of the Third Degree log file:


Third Degree version 4.2
testprog.third run by root on f22a, Wed Dec 30 11:25:49 1998

No .third or //.third file found.

------------------------------------------------------------------------
------------------------------------------------------------------------
Searching for new leaks in heap after program exit

48 bytes in 1 leak (including 1 super leak) created at:
    malloc                         libc.so
    _findiop                       libc.so
    fopen                          libc.so
    main                           testprog
    __start                        testprog

------------------------------------------------------------------------
------------------------------------------------------------------------
memory layout at program exit
        heap                    57344   bytes [0x140002000-0x140010000]
        stack                   1328    bytes [0x11ffffad0-0x120000000]
        testprog data           8192    bytes [0x140000000-0x140002000]
        /usr/shlib/libc.so data 105296  bytes [0x3ffc0800000-0x3ffc0819b50]
        testprog text           393216  bytes [0x120000000-0x120060000]
        /usr/shlib/libc.so text 2686976 bytes [0x3ff80800000-0x3ff80a90000]


Is there really a memory leak within "fopen"?

Thanks
DM

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    



             reply	other threads:[~1999-01-05  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-05  5:00 core__dump [this message]
1999-01-05  5:00 ` Question on "Third Degree" Jarkko Hietaniemi
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox