From: "Sanjib Talukdar" <sanjibt@ascindia.com>
To: <gcc-help@gcc.gnu.org>
Subject: Problem with Map Iterator
Date: Mon, 15 May 2006 13:15:00 -0000 [thread overview]
Message-ID: <E7DA15F84401D6448BEC01065CD94AA20168571B@mailserver.ascindia.com> (raw)
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.
next reply other threads:[~2006-05-15 13:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 13:15 Sanjib Talukdar [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E7DA15F84401D6448BEC01065CD94AA20168571B@mailserver.ascindia.com \
--to=sanjibt@ascindia.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).