Re: [Boost-bugs] [Boost C++ Libraries] #8724: bad_alloc thrown in empty list copy constructor

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8724: bad_alloc thrown in empty list copy constructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-26 15:57:24


#8724: bad_alloc thrown in empty list copy constructor
----------------------------+----------------------------------------------
  Reporter: gleonid@… | Owner: igaztanaga
      Type: Bugs | Status: reopened
 Milestone: To Be | Component: interprocess
  Determined | Severity: Problem
   Version: Boost 1.53.0 | Keywords: bad_alloc interprocess container
Resolution: |
----------------------------+----------------------------------------------

Comment (by gleonid@…):

 please confirm that following is a correct patch

 {{{
 --- boost-1.53.0/boost/container/detail/node_alloc_holder.hpp.orig
 2013-06-25 17:14:06.000000000 -0400
 +++ boost-1.53.0/boost/container/detail/node_alloc_holder.hpp 2013-06-25
 17:14:37.000000000 -0400
 @@ -239,6 +239,8 @@
        ::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)))
 hook_type;
        return (p);
        */
 + if (!n)
 + return;
        typedef typename NodeAlloc::multiallocation_chain
 multiallocation_chain;

        //Try to allocate memory in a single block
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8724#comment:5>
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 : 2017-02-16 18:50:13 UTC