FastNetMon

пятница, 15 ноября 2013 г.

Проблемы с unordered_map в C++/11 на Debian Wheezy

Вот решил оптимизировать свой код, а он мне в ответ сегфолтами:
(gdb) core core
[New LWP 13007]
[New LWP 13002]
[New LWP 13006]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./fastnetmon'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000040e80a in std::__detail::_Hash_code_base<unsigned int, std::pair<unsigned int const, map_element>, std::_Select1st<std::pair<unsigned int const, map_element> >, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, false>::_M_bucket_index(std::__detail::_Hash_node<std::pair<unsigned int const, map_element>, false> const*, unsigned long) const ()
То есть, ошибка где-то во внутренностях реализации хширования unordered_map.

А вот такой бэктрейс:
#0  0x000000000040e80a in std::__detail::_Hash_code_base<unsigned int, std::pair<unsigned int const, map_element>, std::_Select1st<std::pair<unsigned int const, map_element> >, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, false>::_M_bucket_index(std::__detail::_Hash_node<std::pair<unsigned int const, map_element>, false> const*, unsigned long) const ()
(gdb) bt
#0  0x000000000040e80a in std::__detail::_Hash_code_base<unsigned int, std::pair<unsigned int const, map_element>, std::_Select1st<std::pair<unsigned int const, map_element> >, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, false>::_M_bucket_index(std::__detail::_Hash_node<std::pair<unsigned int const, map_element>, false> const*, unsigned long) const ()
#1  0x000000000040b485 in std::_Hashtable<unsigned int, std::pair<unsigned int const, map_element>, std::allocator<std::pair<unsigned int const, map_element> >, std::_Select1st<std::pair<unsigned int const, map_element> >, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, false, false, true>::_M_bucket_index(std::__detail::_Hash_node<std::pair<unsigned int const, map_element>, false>*) const ()
#2  0x00000000004093f8 in std::_Hashtable<unsigned int, std::pair<unsigned int const, map_element>, std::allocator<std::pair<unsigned int const, map_element> >, std::_Select1st<std::pair<unsigned int const, map_element> >, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, false, false, true>::count(unsigned int const&) const ()
#3  0x0000000000405c45 in parse_packet(unsigned char*, pcap_pkthdr*, unsigned char const*) ()
#4  0x0000000000406a8f in ulog_main_loop() ()
#5  0x0000000000417a63 in _ZNSt12_Bind_simpleIFPFvvEvEE9_M_invokeIJEEEvSt12_Index_tupleIJXspT_EEE ()
#6  0x00000000004179b3 in std::_Bind_simple<void (*())()>::operator()() ()
#7  0x0000000000417908 in std::thread::_Impl<std::_Bind_simple<void (*())()> >::_M_run() ()
#8  0x00007ff89362c400 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007ff893a8eb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007ff892e2ea7d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Комментариев нет :

Отправить комментарий

Примечание. Отправлять комментарии могут только участники этого блога.