Boost logo

Boost :

Subject: [boost] [unordered_map] assert fail
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2013-03-07 20:16:50


I got an assert fail on a call to:

            return _map.insert(std::make_pair(newKey, value.second));

The assertion was in delete_buckets()

            BOOST_ASSERT(!this->size_);

Here is a stack trace:

#0 0x00007f3b7c645945 in raise () from /lib64/libc.so.6
#1 0x00007f3b7c646f21 in abort () from /lib64/libc.so.6
#2 0x00007f3b7c63e810 in __assert_fail () from /lib64/libc.so.6
#3 0x000000000075d59f in
boost::unordered::detail::buckets<std::allocator<std::pair<char const*
const, Spl::Market::Symbol*> >, boost::unordered::detail::ptr_bucket,
boost::unordered::detail::ptr_node<std::pair<char const* const,
Spl::Market::Symbol*> >, boost::unordered::detail::mix64_policy<unsigned
long> >::delete_buckets (this=0x7f3b772ac0b0) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/detail/buckets.hpp:834
#4 0x000000000075d125 in
boost::unordered::detail::buckets<std::allocator<std::pair<char const*
const, Spl::Market::Symbol*> >, boost::unordered::detail::ptr_bucket,
boost::unordered::detail::ptr_node<std::pair<char const* const,
Spl::Market::Symbol*> >, boost::unordered::detail::mix64_policy<unsigned
long> >::~buckets (this=0x7f3b772ac0b0, __in_chrg=<optimized out>) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/detail/buckets.hpp:805
#5 0x000000000075cebe in
boost::unordered::detail::table_impl<boost::unordered::detail::map<std::allocator<std::pair<char
const* const, Spl::Market::Symbol*> >, char const*, Spl::Market::Symbol*,
Spl::String::Map<Spl::Market::Symbol*>::HashFunction,
Spl::String::Map<Spl::Market::Symbol*>::Predicate> >::rehash_impl
(this=0xfd1670, num_buckets=64) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/detail/unique.hpp:746
#6 0x000000000075c915 in
boost::unordered::detail::table<boost::unordered::detail::map<std::allocator<std::pair<char
const* const, Spl::Market::Symbol*> >, char const*, Spl::Market::Symbol*,
Spl::String::Map<Spl::Market::Symbol*>::HashFunction,
Spl::String::Map<Spl::Market::Symbol*>::Predicate> >::reserve_for_insert
(this=0xfd1670, size=33) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/detail/table.hpp:413
#7 0x000000000075c48b in
boost::unordered::detail::table_impl<boost::unordered::detail::map<std::allocator<std::pair<char
const* const, Spl::Market::Symbol*> >, char const*, Spl::Market::Symbol*,
Spl::String::Map<Spl::Market::Symbol*>::HashFunction,
Spl::String::Map<Spl::Market::Symbol*>::Predicate>
>::emplace_impl<std::pair<char const* const, Spl::Market::Symbol*> >(char
const* const&, std::pair<char const* const, Spl::Market::Symbol*>&&)
(this=0xfd1670, k=@0x7f3b772ac360: 0x10f0da40 "XJO.5025P13.AX") at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/detail/unique.hpp:464
#8 0x000000000075c0a1 in
boost::unordered::detail::table_impl<boost::unordered::detail::map<std::allocator<std::pair<char
const* const, Spl::Market::Symbol*> >, char const*, Spl::Market::Symbol*,
Spl::String::Map<Spl::Market::Symbol*>::HashFunction,
Spl::String::Map<Spl::Market::Symbol*>::Predicate>
>::emplace<std::pair<char const* const, Spl::Market::Symbol*>
>(std::pair<char const* const, Spl::Market::Symbol*>&&) (this=0xfd1670) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/detail/unique.hpp:430
#9 0x000000000075bebf in boost::unordered::unordered_map<char const*,
Spl::Market::Symbol*, Spl::String::Map<Spl::Market::Symbol*>::HashFunction,
Spl::String::Map<Spl::Market::Symbol*>::Predicate,
std::allocator<std::pair<char const* const, Spl::Market::Symbol*> >
>::emplace<std::pair<char const* const, Spl::Market::Symbol*>
>(std::pair<char const* const, Spl::Market::Symbol*>&&) (this=0xfd1670) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/unordered_map.hpp:239
#10 0x000000000075bcf0 in boost::unordered::unordered_map<char const*,
Spl::Market::Symbol*, Spl::String::Map<Spl::Market::Symbol*>::HashFunction,
Spl::String::Map<Spl::Market::Symbol*>::Predicate,
std::allocator<std::pair<char const* const, Spl::Market::Symbol*> >
>::insert(std::pair<char const* const, Spl::Market::Symbol*>&&)
(this=0xfd1670, x=...) at
/hostname/trading/sdk/include/boost-1.51.0/boost/unordered/unordered_map.hpp:388


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk