Hi, all,

I encountered some memory leak problems in my code performing SMIME operation on NT 
reported by Purify. In order to identify the problem, I create a VC++ project smime.c 
which is installed under openssl-0.9.6a/apps directory. This project only include 
smime.c, apps.c, apps.h, app_rand.c. I am getting exactly the same memory leak 
message, shown below

[W] MLK: Memory leak of 172 bytes from 1 block allocated in 
I_RpcBindingInqTransportType
        Distribution of leaked blocks
        Allocation location
            RtlAllocateHeap+0xc  [NTDLL.dll ip=0x67f613f9]
            I_RpcBindingInqTransportType+0x5c [RPCRT4.dll ip=0x77e12bbe]
            I_RpcBindingCopy+0x40 [RPCRT4.dll ip=0x77e1968e]
            I_RpcClearMutex+0x84 [RPCRT4.dll ip=0x77e12fe6]
            I_RpcSendReceive+0x1ac [RPCRT4.dll ip=0x77e12534]
            NdrPointerUnmarshall+0x33 [RPCRT4.dll ip=0x77e12d2e]
            NdrClientCall+0x47d  [RPCRT4.dll ip=0x77e54abc]
            ElfReportEventA+0x2ce [ADVAPI32.dll ip=0x77dcac07]
            RegisterEventSourceA+0x31 [ADVAPI32.dll ip=0x77dc1889]
            RegisterEventSourceA+0xb [ADVAPI32.dll ip=0x67dc112e]
            CollectNSPerformanceData+0x267 [nsctr.dll ip=0x02da19b7]
            RegSetValueExW+0x74a6 [ADVAPI32.dll ip=0x77de3767]
            RegSetValueExW+0x3211 [ADVAPI32.dll ip=0x77ddf4d2]
            RegQueryValueExA+0xb [ADVAPI32.dll ip=0x67dc123e]
            RAND_poll+0x1fc      [LIBEAY32.dll ip=0x1004b74c]
            RAND_screen+0x8      [LIBEAY32.dll ip=0x1004bf18]
            app_RAND_load_file+0xf2 [app_rand.c:130 ip=0x0040b152]
                #ifdef WINDOWS
                    BIO_printf(bio_e,"Loading 'screen' into random state -");
                    BIO_flush(bio_e);
             =>     RAND_screen();
                    BIO_printf(bio_e," done\n");
                #endif
                
            main+0x2743          [smime.c:306 ip=0x00403833]
                    }
                
                    if (need_rand) {
             =>         app_RAND_load_file(NULL, bio_err, (inrand != NULL));
                        if (inrand != NULL)
                            BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
                                app_RAND_load_files(inrand));
            mainCRTStartup+0x32d [crt0.c:206 ip=0x0040fc6d]

Does anybody have any suggestion on this? Is this a known problem?

If I put 

        CRYPTO_malloc_debug_init();
          CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
          CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
and
    CRYPTO_mem_leaks_fp(stderr);

at the beginning and the end of the program, I got one more leak in 
CRYPTO_malloc.

I searched through the archive, and found one message

http://marc.theaimsgroup.com/?l=openssl-dev&m=101118260003347&w=2

regarding RAND_poll on NT. Is this related with that problem?  I would need to run 
purify on Unix boxes also, does anybody know if the same problem exists on Unix?


Thanks in advance for any help. I am desperated with this problem because this is hold 
up our release.

Kate
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to