[Bug libstdc++/55911] Segfault in unordered_map with max_load_factor > 1

timj at gtk dot org gcc-bugzilla@gcc.gnu.org
Mon Jan 28 01:13:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55911

--- Comment #7 from Tim Janik <timj at gtk dot org> 2013-01-28 01:13:04 UTC ---
(In reply to comment #4)
> Debug Mode even catches it:
> 
> unordered_map:        max_size: 576460752303423487
> unordered_map:            size: 10352716
> unordered_map:    bucket_count: 218971
> unordered_map:     load_factor: 47.278938
> unordered_map: max_load_factor: 50.000000
> /home/wakelj/tools/Linux-f12-x86_64/4.8/include/c++/4.8.0/debug/unordered_map:229:
>     error: attempt to access container with out-of-bounds bucket index
>     218971, container only holds 218971 buckets.
> 
> Objects involved in the operation:
> sequence "this" @ 0x0x7fffd8ae2810 {
>   type = NSt7__debug13unordered_mapIld11HashPtrdiffSt8equal_toIlESaIlEEE;
> }
> Aborted (core dumped)

Thanks, I'm impressed to see that.
How did you get that message? Just using g++-4.7 -D_GLIBCXX_DEBUG still gives
me the segfault.



More information about the Gcc-bugs mailing list