This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/51845] [4.7 regression] 23_containers/unordered_multimap/erase/24061-multimap.cc segfault


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]