[Boost-bugs] [Boost C++ Libraries] #13389: rbtree_best_fit.hpp:grow() if condition error

Subject: [Boost-bugs] [Boost C++ Libraries] #13389: rbtree_best_fit.hpp:grow() if condition error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-11 01:57:50


#13389: rbtree_best_fit.hpp:grow() if condition error
------------------------------------------+---------------------------
 Reporter: jakciehan <hanchengxi0423@…> | Owner: Ion Gaztañaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.66.0 | Severity: Problem
 Keywords: grow |
------------------------------------------+---------------------------
 in file boost/interprocess/mem_algo/rbtree_best_fit.hpp:480
 func:

 {{{
 void rbtree_best_fit<MutexFamily, VoidPointer,
 MemAlignment>::grow(size_type extra_size)
 {
   ...
    if((m_header.m_size - old_border_offset) < MinBlockUnits){
       return;
    }
 ...
 }
 }}}

 condition error.
 the if condition should be :
 {{{
   if((m_header.m_size - old_border_offset) < MinBlockUnits*Alignment) {
     return;
   }

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13389>
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-01-11 02:03:42 UTC