W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Memory leaks / crashes after running sample programs.

From: Amit Shirodkar <amit@Elock.Com>
Date: Mon, 12 Jul 1999 11:01:20 -0500
Message-ID: <001601becc7f$c8dd1ec0$512068c0@Zebra81.Frontiertech.com>
To: <www-lib@w3.org>
Hi,
 
I downloaded the installation and the source code for the W3 library. I ran sample programs, particularly "showtags.exe". It worked fine. However, when I used the same code in my sample MFC application, it gave me memory leaks / crashes( release version ). I ran my MFC program through BoundsChecker, a  utililty that checks for memory leaks, API failures, etc. and gives error reporting. It reported the following memory leaks :
 
1.      2396 bytes allocated by calloc in HTMemory.c( line 88 ), HANDLE : 0x03100A2C - the code is that of PUBLIC void * HTMemory_calloc (size_t nobj, size_t size).
 
2.  3196 bytes allocated by GlobalAlloc in MSWSOCK.DLL!00001493, HANDLE:0x00600134. The code is a call to HTEventInit()in HTProfile_newHTMLNoCacheClient().
 
3.  164 bytes allocated by GlobalAlloc in RNR20.DLL!00004C64, HANDLE:0x00602420. The code is 
status = HTGetHostByName(host, hostname, request); in
PUBLIC int HTParseInet (... )
 
4.   8 bytes allocated by calloc in HTMemory.c( line 88 ), HANDLE:0x03211820. The code is again inside HTMemory_calloc 
 
5.   4 bytes allocated by malloc in HTMemory.c( line 68 ), HANDLE:0x03211E20. The code is inside HTMemory_malloc.
 
6.   Resource leak allocated by LoadLibraryA in RNR20.DLL!0000775C, HANDLE:0X78860000 - no source file specified.
 
7.    Resource leak allocated by LoadLibraryA in RNR20.DLL!00007E05, HANDLE:0X70100000 . The code is 
status = HTGetHostByName(host, hostname, request); function 
HTParseInet ()in the file HTInet.c
 
8. Resource leak allocated by socket in HTTCP.C( line 97 ), HANDLE:0X000000E4 . The call is the #else part of
#ifdef DECNET

if ((sockfd=socket(AF_DECnet, SOCK_STREAM, 0))==INVSOC)

#else

if ((sockfd=socket(AF_INET, SOCK_STREAM,IPPROTO_TCP))==INVSOC)

#endif 

in the function PRIVATE int _makeSocket(..);



The *same* errors / leaks are coming in the "showtags.exe" program - both debug and release versions( I have the source code too ).  I checked out the repository, but my sources appear to be the latest.
 
Can anyone kindly tell me what is the problem ? Is there a fix  / workaround for this ?
 
Regards,

Amit.
 
From compromise and things half done ,
Keep me with stern and stubborn pride ;
And when at last the fight is won ,
God , keep me still unsatisfied .
 
                ---  Louis Untermeyer , "Prayer"
 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  
 Amit P. Shirodkar                          
-   Systems Engineer
-   Frontier Technologies Corporation        
-   Home Page :
           http://members.tripod.com/~amit_shirodkar/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To provide security middleware integrating PKI & VPN into business processes
to implement high value Assured Transactions.
 
    Visit our website at WWW.Elock.Com
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Received on Monday, 12 July 1999 12:00:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:16 UTC