From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b6eb9e2c8cc160c6,start X-Google-Attributes: gid1164f8,public X-Google-Thread: f6134,b6eb9e2c8cc160c6,start X-Google-Attributes: gidf6134,public From: core__dump@my-dejanews.com Subject: Question on "Third Degree" Date: 1999/01/05 Message-ID: <76tf7p$bin$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 429036837 X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 129.198.31.76 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Jan 05 16:39:21 1999 GMT Newsgroups: comp.sys.dec,comp.unix.osf.*,comp.org.decus X-Http-User-Agent: Mozilla/3.01Gold (X11; I; OSF1 V3.2 alpha) 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 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