public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with Map Iterator
@ 2006-05-15 13:15 Sanjib Talukdar
  2006-05-15 13:18 ` John Love-Jensen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sanjib Talukdar @ 2006-05-15 13:15 UTC (permalink / raw)
  To: gcc-help

Hi,

I am getting a segmentation fault error while executing the following
code:

	if (!this->colDtlsByName.empty())
	{
	     std::map< std::string, CS_DATAFMT*, 
	     std::less<std::string> >::iterator iterMap; 
	    for (iterMap = this->colDtlsByName.begin();
		iterMap != this->colDtlsByName.end(); ++iterMap)
	   {
	       CS_DATAFMT* obj = iterMap->second;
	       if (obj != NULL)
	             delete obj;
	       this->colDtlsByName.erase(iterMap);
	   }
	}

The backtrace from gdb is as follows:

	#0  0xff0e29b4 in std::_Rb_tree_increment () from
/usr/sfw/lib/libstdc++.so.6
	#1  0x0009854c in std::_Rb_tree_iterator<std::pair<std::string
const, _cs_datafmt*> >::operator++ (this=0xfe77a0c4) at stl_tree.h:180
	#2  0x0005a84c in MACDBQueryHandler::clearColInfo
(this=0xfe77bd30, inType=ALL)
	    at MACDBQueryHandler.C:123

The above code is in the method MACDBQueryHandler::clearColInfo() which
is being invoked in the class destructor.
We are using gcc version 3.4.3 on Solaris 10. The library libstdc++.so.6
is pointing to libstdc++.so.6.0.3.

Can anyone please point out the reason for the error?
Thank You.
Sanjib.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-05-21  7:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-15 13:15 Problem with Map Iterator Sanjib Talukdar
2006-05-15 13:18 ` John Love-Jensen
2006-05-15 13:22   ` Aseem Rastogi
2006-05-15 13:46     ` John Love-Jensen
2006-05-15 13:21 ` Burak Serdar
2006-05-15 13:22 ` Aseem Rastogi
2006-05-15 14:04   ` Peter Doerfler
2006-05-21  7:58     ` Dima Sorkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).