Subject: [Boost-bugs] [Boost C++ Libraries] #10629: Interprocess Vector resize causes crash
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-10-07 11:21:33
#10629: Interprocess Vector resize causes crash
----------------------------------+--------------------------
Reporter: peter.durrant@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.56.0 | Severity: Problem
Keywords: interprocess, vector |
----------------------------------+--------------------------
Our existing code that has worked through many versions of Boost has
failed in Boost 1.56.0.
I've reduced our code down to a specific example that replicates the issue
in the following development environment:
(1) Windows 7 64-bit
(2) VS2010 and VS2013 (generating X64 code)
The example code produces a tree-like structure. Each node contains an
interprocess vector that contains child nodes. The depth of the tree is 3
(parent, child, grandchild). The parent (root) node contains '''D''' child
nodes, each child node contains '''D''' grandchild nodes, and the children
of the grandchild nodes are left empty. The example program crashes when
using a dimension, '''D''', of 43, but is fine for 42 and less.
The tree is constructed in a depth-first process so there will be some
resizing of the vectors in the child and parent nodes after the grandchild
nodes have been created and added to the structure.
The crash generates the following error:
''Assertion failed: ptr != 0, file D:\boost64\include\boost-
1_56\boost/interprocess/allocators/allocator.hpp, line 268''
The crash can be prevented by reserving the correct amount of space ahead
of node insertion.
Sample code is available:
github.com/peter-
durrant/sandbox/tree/master/boost_interprocess_vector_broken
(CPP file attached)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10629> 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:17 UTC