[Boost-bugs] [Boost C++ Libraries] #13628: boost::intrusive::rbtree::insert_unique() may throw, contrary to what the doc says

Subject: [Boost-bugs] [Boost C++ Libraries] #13628: boost::intrusive::rbtree::insert_unique() may throw, contrary to what the doc says
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-07-06 12:07:07


#13628: boost::intrusive::rbtree::insert_unique() may throw, contrary to what the
doc says
------------------------------+---------------------------
 Reporter: anonymous | Owner: Ion Gaztañaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 The doc says:

   Throws: Nothing.

 but it actually may throw if the comparator throws.

 {{{
 seastar::memory::alloc_failure_injector::fail() at
 /home/tgrabiec/src/scylla/seastar/util/alloc_failure_injector.cc:38
 seastar::memory::alloc_failure_injector::on_alloc_point() at
 /home/tgrabiec/src/scylla/seastar/util/alloc_failure_injector.hh:65
  (inlined by) seastar::memory::on_alloc_point() at
 /home/tgrabiec/src/scylla/seastar/util/alloc_failure_injector.hh:121
  (inlined by) managed_bytes::read_linearize() const at
 /home/tgrabiec/src/scylla/./utils/managed_bytes.hh:141
  (inlined by) managed_bytes::data() const at
 /home/tgrabiec/src/scylla/./utils/managed_bytes.hh:396
  (inlined by) managed_bytes::operator
 std::experimental::fundamentals_v1::basic_string_view<signed char,
 std::char_traits<signed char> >() const at
 /home/tgrabiec/src/scylla/./utils/managed_bytes.hh:337
  (inlined by) dht::token_view::token_view(dht::token const&) at
 /home/tgrabiec/src/scylla/dht/i_partitioner.hh:151
  (inlined by) dht::token::operator dht::token_view() const at
 /home/tgrabiec/src/scylla/dht/i_partitioner.hh:147
  (inlined by) dht::decorated_key::tri_compare(schema const&,
 dht::decorated_key const&) const at
 /home/tgrabiec/src/scylla/dht/i_partitioner.cc:191
  (inlined by) dht::decorated_key::less_compare(schema const&,
 dht::decorated_key const&) const at
 /home/tgrabiec/src/scylla/dht/i_partitioner.cc:217
  (inlined by)
 dht::decorated_key::less_comparator::operator()(dht::decorated_key const&,
 dht::decorated_key const&) const at
 /home/tgrabiec/src/scylla/dht/i_partitioner.cc:226
 memtable_entry::compare::operator()(memtable_entry const&, memtable_entry
 const&) const at /home/tgrabiec/src/scylla/memtable.hh:99
  (inlined by) boost::intrusive::tree_value_compare<memtable_entry*,
 memtable_entry::compare, boost::move_detail::identity<memtable_entry>,
 true>::operator()(memtable_entry const&, memtable_entry const&) const at
 /usr/include/boost/intrusive/detail/tree_value_compare.hpp:147
  (inlined by) bool
 boost::intrusive::detail::key_nodeptr_comp<memtable_entry::compare,
 boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, boost::move_detail::identity<memtable_entry>
>::operator()<boost::intrusive::rbtree_node<void*>*,
 memtable_entry>(boost::intrusive::rbtree_node<void*>* const&,
 memtable_entry const&,
 boost::move_detail::enable_if_c<boost::intrusive::detail::key_nodeptr_comp<memtable_entry::compare,
 boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, boost::move_detail::identity<memtable_entry>
>::is_same_or_nodeptr_convertible<boost::intrusive::rbtree_node<void*>*>::value&&(!boost::intrusive::detail::key_nodeptr_comp<memtable_entry::compare,
 boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, boost::move_detail::identity<memtable_entry>
>::is_same_or_nodeptr_convertible<memtable_entry>::value), void>::type*)
 const at /usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp:100
  (inlined by) std::pair<boost::intrusive::rbtree_node<void*>*, bool>
 boost::intrusive::bstree_algorithms<boost::intrusive::rbtree_node_traits<void*,
 false> >::insert_unique_check<memtable_entry,
 boost::intrusive::detail::key_nodeptr_comp<memtable_entry::compare,
 boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, boost::move_detail::identity<memtable_entry> >
>(boost::intrusive::rbtree_node<void*> const* const&,
 boost::intrusive::rbtree_node<void*>* const&, memtable_entry const&,
 boost::intrusive::detail::key_nodeptr_comp<memtable_entry::compare,
 boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, boost::move_detail::identity<memtable_entry> >,
 boost::intrusive::insert_commit_data_t<boost::intrusive::rbtree_node<void*>*>&,
 unsigned long*) at /usr/include/boost/intrusive/bstree_algorithms.hpp:1083
  (inlined by)
 boost::intrusive::bstree_impl<boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, void, memtable_entry::compare, unsigned long,
 true, (boost::intrusive::algo_types)5,
 void>::insert_unique(boost::intrusive::tree_iterator<boost::intrusive::mhtraits<memtable_entry,
 boost::intrusive::set_member_hook<void, void, void, void>,
 &memtable_entry::_link>, true>, memtable_entry&) at
 /usr/include/boost/intrusive/bstree.hpp:1153

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13628>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-07-06 12:12:55 UTC