I know that the people in this newsgroup are probably tired of hearing me complain... But I have a new problem today. I probably have described my program in other threads and it is working fine except for one small thing that is killing me. I have a program that uses multiple threads to accomplish a proxy for other protocols, but my issue really is that sometimes.... and only sometimes... the program crashes with a bus error. At the base of the core dump is always the free function... and somewhere in the trace is the PR_Close function. I dynamically allocate memory in other places in my program, but freeing it never causes the crash. I would at first think that it was a heap corruption, but the crash only happens with the PR_Close function. I will post the stack trace for clarity...
Might anyone see anything in this that I can't? #0 0xfeb42bbc in _free_unlocked () from /usr/lib/libc.so.1 #1 0xfeb42b74 in free () from /usr/lib/libc.so.1 #2 0xfec2ebc4 in PR_Free (ptr=0x61737465) at ../../../../pr/src/malloc/prmem.c:456 #3 0xfee95580 in PORT_Free (ptr=0x61737465) at secport.c:149 #4 0xfee93d00 in SECITEM_FreeItem (zap=0x5a1dd8, freeit=1) at secitem.c:250 #5 0xfee5a718 in PK11_DestroyContext (context=0x6a19c0, freeit=1) at pk11skey.c:3763 #6 0xfed49a94 in ssl3_CleanupKeyMaterial (mat=0x4e6e44) at ssl3con.c:1261 #7 0xfed49b48 in ssl3_DestroyCipherSpec (spec=0x4e6e20) at ssl3con.c:1285 #8 0xfed5e2ec in ssl3_DestroySSL3Info (ssl3=0x4e6d40) at ssl3con.c:8906 #9 0xfed747d8 in ssl_DestroySocketContents (ss=0xfdd8d250) at sslsock.c:377 #10 0xfed74a08 in ssl_FreeSocket (ss=0x8f4aa8) at sslsock.c:439 #11 0xfed6a798 in ssl_DefClose (ss=0x8f4aa8) at ssldef.c:244 #12 0xfed6f40c in ssl_SecureClose (ss=0x8f4aa8) at sslsecur.c:903 #13 0xfed771d0 in ssl_Close (fd=0x4d3dd0) at sslsock.c:1204 #14 0xfec1e610 in PR_Close (fd=0x4d3dd0) at ../../../../pr/src/io/priometh.c:133 #15 0xff1c71e4 in destroySecureConnection (ch=0x4d3dd0, e=0xfdd91890) at coess_connection_functions.c:1298 #16 0xff365dc0 in handleDataTransfer (arg=0xfdf51b80) at ssafap_thread_functions2.c:366 #17 0xfec56c60 in _pt_root (arg=0x8cdbf0) at ../../../../pr/src/pthreads/ptthread.c:214 #18 0xfea4b024 in _thread_start () from /usr/lib/libthread.so.1 #19 0xfea4b024 in _thread_start () from /usr/lib/libthread.so.1 I would also wonder if this was related to a double-free condition, but nothing seems to indicate that that is the case... I looked at the code by hand, checked it with valgrind and with dmalloc. It runs flawlessly on linux, but crashes on Solaris. -David _______________________________________________ mozilla-crypto mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-crypto
