Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

core dump when clearing vector of std::string/creating std:string

807575Feb 24 2010 — edited Mar 17 2010
Hi,
I am seeing a couple of core dump which point to std::strings like the ones below. The application is a multi-threaded application and compiled on sun4u 5.8 sparc with Sun Studio 11 C++ compiler 5.8 Patch 121017-16. The stack trace is being shown from a shared library which we built and is being used by our daemon service. I stack traces points to code where simple operation like clearing of vector<std::string> or creating or erasing std::string. The runtime environment is Solaris 5.10 sun4u sparc with SUNWlibC patches of 119963-19 and 119963-10.

We had an issue with clearing of vectors earlier whcih we solved by applying some compiler patches. This issue coming even after we have built the binaries with compiler patches. I have made sure that both the daemon and the shared library are all built with same compiler version. I would appreciate if any possible direction can be given for this.

======================1=================================
$c
libc.so.1`t_splay+0x10(82d828, 38, 753d736f, ff324c28, fe0b03a8, 732c6f3d)
libc.so.1`realfree+0x8c(82d7e8, 39, d995c, fe7153a4, 0, 0)
libc.so.1`_free_unlocked+0xb0(fe0b9224, 0, d9188, fe0b92a4, fe0b03a8, 555810)
libc.so.1`free+0x24(555810, 555810, d91c8, fe041ebc, fe0b03a8, 555831)
libCrun.so.1`void operator delete+4(555810, 0, 0, ffffffff, 59, 0)
libCstd_isa.so.1`std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string #Nvariant 1+0x84(0, 555838, 2160c,
555838, 38, 754b3c)
...
======================2=================================
$c
libc.so.1`t_splay+0xf4(590e78, 3b0, 6934c8, fdfd6eb0, fe0b03a8, 0)
libc.so.1`realfree+0xb8(590e78, 5b, d995c, 0, 0, 5912b8)
libc.so.1`cleanfree+0x5c(0, 19, d90ac, fe042230, fe0b03a8, fe0b92a4)
libc.so.1`_malloc_unlocked+0xf4(8, 0, 0, fe29c734, fe0b3910, fe29c734)
libc.so.1`malloc+0x4c(8, 1, da058, fe85eb20, fe0b03a8, fe0ba518)
libCrun.so.1`void*operator new+0x28(8, 66c918, 7, fed6bf10, 14e98, 3afc38)

======================3=================================
C [libc.so.1+0x57204] free+0x2c
C [libCrun.so.1+0x665c] void operator delete(void*)+0xc
C [libCstd_isa.so.1+0xd9ac]
cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Hreplace6MIIpkc
III_pc_+0x120
C [libCstd_isa.so.1+0x1a488]
std::string &std::string::erase(unsigned,unsigned)+
0x5c
======================4=================================
C [libCstd_isa.so.1+0x119c8]
cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___M__sun_append6M
rk1_r1_+0x10
======================5=================================
C [libc.so.1+0x5639c] malloc+0x54
C [libCrun.so.1+0x70a4] void*operator new(unsigned)+0x30
C [libCstd_isa.so.1+0xc69c]
cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___I__getRep6MII_p
nH__rwstdM__string_ref4Ccn0B_n0C____+0x60
C [libCstd_isa.so.1+0xdad0]
cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Hreplace6MIIpkc
III_pc_+0x1c0
C [libCstd_isa.so.1+0xf5b4]
std::string &std::string::operator=(const char*)+0x1
08

Edited by: bekz007 on Feb 24, 2010 1:55 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2010
Added on Feb 24 2010
11 comments
996 views