[Boost-bugs] [Boost C++ Libraries] #2339: segment manager releases memory used for an intrusive node before it's erased from the index

Subject: [Boost-bugs] [Boost C++ Libraries] #2339: segment manager releases memory used for an intrusive node before it's erased from the index
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-09-18 11:16:51


#2339: segment manager releases memory used for an intrusive node before it's
erased from the index
---------------------------------------------+------------------------------
 Reporter: Devin Bayer <web_at_[hidden]> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.37.0 | Component: interprocess
  Version: Boost 1.36.0 | Severity: Showstopper
 Keywords: |
---------------------------------------------+------------------------------
 If these are true:
     (1) use an intrusive index with managed memory segments
     (2) construct an object and have the constructor throw

 Then you will get random segfaults. This is because memory used for the
 node in the intrusive index is freed before that node is removed from the
 index. Then that memory may get overwritten (by the allocation node
 eraser) and when the node is removed unexpected things happen.

 The solution is to apply this patch, so that the «value_eraser» is created
 after the «mem_algo_deallocator» and hence their destructors are called in
 the proper order.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2339>
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:49:58 UTC