This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21874] New: this pointer somehow gets NULLed between member function calls
- From: "bjs5075 at rit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2005 03:40:21 -0000
- Subject: [Bug c++/21874] New: this pointer somehow gets NULLed between member function calls
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following is a partial stack dump from GDB. It shows that the this pointer
becomes NULL when calling one (private) member function from another (public)
member function.
#5 0x0805864e in ConfigReader::read_config (this=0x0, type=@0xbffffac0)
at file_reader.cpp:186
#6 0x08058079 in ConfigReader::entity (this=0x808791c, type=@0xbffffac0)
at file_reader.cpp:148
The relevant function is:
const EntityInfo & ConfigReader::entity(const std::string &type) {
infomap::iterator i = cache_.find(type);
// If not found, attempt to read the config file for that entity
if (i == cache_.end()) {
i = read_config(type);
}
return i->second;
}
--
Summary: this pointer somehow gets NULLed between member function
calls
Product: gcc
Version: 3.3.6
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bjs5075 at rit dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21874