Core dump(abort) due to double free at STL string '='operator,with mtmalloc
I have a probrem; my program crashes due to SIGABRT.
My program is multithreaded (about 600 thread total),and uses libmtmalloc for more performance.
By stack trace , when handling of substitution operation ('=' operator) of STL string ,
free() and abort() is called like this:
-- lwp# 235 / thread# 235 --
fe9609d7 _lwp_kill (eb, 6) + 7
fe90cf93 raise(6) + 1f
fe8f0a29 abort(4686b364, 41c05454, fe9e91c0, 20, 4d1e97a8, efe5cfa8) + cd
fed60a99 free(4d1ea1d8) + 193
fe9d5b4a void operator delete(void*) (4d1ea1d8) + 26
feabf612 std::string &std::string::operator=(const std::string &) (4686b364, 41c05454) + 92
081af897 My_Class&My_Class::operator=(const My_Class&) (4686b358, 41c05448) + 3f
I know that , abort() is called when same pointer is freed twice using libmtmalloc.
But i don't know why double-freed when '=' operator of STL string. do you have any idea about it?
This is rarely reproducible, but it does been happened about 2 - 30 days interval.
This double-free is not happend only one specific class , it seems that it is happend at 3 or 4 classes.
Is this libmtmalloc problem or a bug of my program? If it is my bug, any suggetion ?
It seems to be a known bug below ,but this bug is fixed at Sun C++ 5.7.
-> Patch numbers for Sun C++ 5.6: BugIDs: 5041951 sparc: 117549-01 x86:117550-01
5041951 std::string destructor abort on freeing memory in multithreaded environment
Do you have any solution or workaround ?
OS: Solaris10(x86)/Compiler: Sun C++ 5.7
Thanks in advance.

