This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/24064] New: tr1::unordered_map seems to seg-fault when caching hash values
- From: "atavory at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2005 09:54:20 -0000
- Subject: [Bug libstdc++/24064] New: tr1::unordered_map seems to seg-fault when caching hash values
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following snippet of code seg-faults:
typedef
std::tr1::unordered_map<
int,
char,
__gnu_cxx::hash<
int>,
std::equal_to<
int>,
std::allocator<
std::pair<
const int,
char> >,
true> // (*)
map_t;
map_t m;
int i;
for(i = 0; i < 1000; ++i)
m[i] = 'a';
for(i = 0; i < 1000; ++i)
++m.find(i)->second;
If, however, the value in the line marked with (*) is changed to false (i.e.,
the container does not cache hash values), it runs fine.
g++ --version outputs: g++ (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
Thanks!
--
Summary: tr1::unordered_map seems to seg-fault when caching hash
values
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: atavory at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24064