[Bug libstdc++/51845] [4.7 regression] 23_containers/unordered_multimap/erase/24061-multimap.cc segfault
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 18 22:01:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51845
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-18 20:52:27 UTC ---
Other alternatives to fix this would be to add
size_t __prev_bkt = _M_bucket_index(__prev_n);
before the for (;;) loop and change the
if (__n && __n_bkt != __bkt)
test to
if (__n && __prev_bkt != __n_bkt)
or remove the
__is_bucket_begin = true;
line and do instead
__is_bucket_begin = __n_bkt != __bkt;
before the if (__n == __last_n) test and then test just __n &&
__is_bucket_begin after the for (;;) loop. But I think the patch I'm
bootstrapping/regtesting right now is cheaper than that.
More information about the Gcc-bugs
mailing list