Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > help for the core dump in ::std::map

Reply
Thread Tools

help for the core dump in ::std::map

 
 
robeson
Guest
Posts: n/a
 
      11-18-2009
Hi ,
I have a core dump while access std map in sparc solaris ...
codes like below :
CItem * getItem(const string& id) { return m_mapItem[id]; }
m_mapItem defined as below :
map<string, CItem *> m_mapItem;
It is single threaded ....
every time access the map, a core generated ...

core like below :
t@9 (l@9) terminated by signal SEGV (no mapping at the fault address)
0xfdb46f14: compare+0x0010: ld [%o5 - 8], %o2
Current function is std:perator<
<char,std::char_traits<char>,std::allocator<char > >
....
[1] std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>::compare(0x143450, 0x0, 0xff000000, 0x274f18, 0x0, 0xb9), at

0xfdb46f14
=>[2] std:perator< <char,std::char_traits<char>,std::allocator<char >
>(lhs = CLASS, rhs = CLASS), line 1685 in "string"

[3]
std::less<std::basic_string<char,std::char_traits< char>,std::allocator<char>
> >:perator()(this = 0xdf895, x = CLASS, y = CLASS), line 166 in

"functional"
[4]
__rwstd::__rb_tree<std::basic_string<char,std::cha r_traits<char>,std::allocator<char>
>,std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,CMoc*>,__rwstd::__select1st<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,CMoc*>,std::basic_string<char,std::char_traits<c har>,std::allocator<char>
>
>,std::less<std::basic_string<char,std::char_trait s<char>,std::allocator<char>
> >,std::allocator<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,CMoc*> > >::insert(this = 0xdf878, v = STRUCT), line 195 in

"tree.cc"
[5]
std::map<std::basic_string<char,std::char_traits<c har>,std::allocator<char>
>,CMoc*,std::less<std::basic_string<char,std::char _traits<char>,std::allocator<char>
> >,std::allocator<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,CMoc*> > >::insert(this = 0xdf878, x = STRUCT), line 237 in "map"

[6]
std::map<std::basic_string<char,std::char_traits<c har>,std::allocator<char>
>,CMoc*,std::less<std::basic_string<char,std::char _traits<char>,std::allocator<char>
> >,std::allocator<std:air<const

std::basic_string<char,std::char_traits<char>,std: :allocator<char>
>,CMoc*> > >:perator[](this = 0xdf878, k = CLASS), line 233 in "map"


It seems while I use mapX[] , a insert is launched and core ....
Does anybody have a clue to investigate ?
Thanks in advance !
 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      11-18-2009
* robeson:
> Hi ,
> I have a core dump while access std map in sparc solaris ...
> codes like below :
> CItem * getItem(const string& id) { return m_mapItem[id]; }
> m_mapItem defined as below :
> map<string, CItem *> m_mapItem;
> It is single threaded ....
> every time access the map, a core generated ...


Check the FAQ item on how to post a question about Code That Does Not Work.


Cheers & hth.,

- Alf
 
Reply With Quote
 
 
 
 
Vladimir Jovic
Guest
Posts: n/a
 
      11-18-2009
robeson wrote:

> Does anybody have a clue to investigate ?


This might help :
http://www.parashift.com/c++-faq-lit...t.html#faq-5.8


--
Bolje je ziveti sto godina kao bogatun, nego jedan dan kao siromah!
 
Reply With Quote
 
White Wolf
Guest
Posts: n/a
 
      11-19-2009
robeson wrote:
[SNIP]
> It seems while I use mapX[] , a insert is launched and core ....
> Does anybody have a clue to investigate ?
> Thanks in advance !


Start by creating a minimal, compilable and then executable example code
results in the same crash. Veeery minimal. Preferably one short file,
no headers, only cpp (implementation). With a main function, otherwise
it won't link.

Hint: While preparing that minimal example you will most probably find
the bug yourself.

BR, WW
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dump complete java VM state as core dump (not via OS) possible? halfdog Java 12 02-21-2013 06:14 AM
Help: C++ Core dump generated wodaxia C++ 2 05-05-2009 05:24 AM
Help me about segmentation fault (core dump) Willy Wijaya C Programming 4 01-24-2008 01:05 AM
Core Solo & Core Duo are not Core microarchitecture; 65nm Pentium M chips bigal Hardware 0 03-22-2006 11:24 AM
Read Core Dump file ns Cisco 8 05-26-2005 03:07 AM



Advertisments