hi all:
       first thanks for your openssl. 
       i use the openssl0.9.8g + DTLS patch。i found a bug in my code.
       there is the information:
       

I have an issue in OpenSSL, I call the free function to free the BIO resource:

                   if (para.dtls.SslBioPtr != NULL){  çI do the test, the free 
point is the correct address which get from BIO_new_dgram

                            ah_err("ready free BIO %x",para.dtls.SslBioPtr);

                    BIO_free(para.dtls.SslBioPtr);  <=core after this function

                            ah_err("free BIO ok");  çcan not print this 
information

                            para.dtls.SslBioPtr = NULL;

        }

        I often found core after BIO_free function. But I add the debug 
information to BIO_free function, each time the function is return correct. But 
the next information is not print out (free BIO ok), segment fault will happen.

         

         I check the core file, every time core is in libc function:

         Program terminated with signal 5, Trace/breakpoint trap.

#0  0x0f9a5088 in main_arena () from 
/opt/aero/crosstool/gcc-4.0.3-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6

(gdb) bt

#0  0x0f9a5088 in main_arena () from 
/opt/aero/crosstool/gcc-4.0.3-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6

#1  0x0fa602a4 in file_ctrl () from 
/opt/aero/crosstool/gcc-4.0.3-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libcrypto.so.0.9.8

#2  0x10015054 in dtls_clean () at dtls.c:90

#3  0x1001560c in dtls_thread () at dtls.c:217

#4  0x0fe04f48 in pthread_start_thread () from 
/opt/aero/crosstool/gcc-4.0.3-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libpthread.so.0

#5  0x0f9316f8 in clone () from 
/opt/aero/crosstool/gcc-4.0.3-glibc-2.3.5/powerpc-603-linux-gnu/powerpc-603-linux-gnu/lib/libc.so.6

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

 

I google the main_arena function, there have many segment fault in this 
function. But I don’t found the file_ctrl function with main_arena, 

Is it our libc problem? Can you help me?

 
thanks
lei
 

Reply via email to