David,

David wrote:
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...

Are you by any chance using the same socket in multiple threads ? Make sure you have the proper synchronization . You may have a double PR_Close on the socket as well.


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.

What tools are you using on Solaris to diagnose this problem ?
Sun has an excellent memory checking feature in its debugger . I recommend the dbx from Forte 6.2 or Studio 10 .
You can load your program within dbx, type "check -all", or "check -access", then run the program inside dbx . See what you get. The stack you posted looks like there is probably an application error. Was the socket that you got the crash on a listen socket, or a connection socket ?
_______________________________________________
mozilla-crypto mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-crypto

Reply via email to