Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9224: rapidxml, memory corruption in class memory_pool, private member m_static_memory; not threadsafe in multi-threaded process
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-10 15:13:54
#9224: rapidxml, memory corruption in class memory_pool, private member
m_static_memory; not threadsafe in multi-threaded process
-------------------------+-------------------------------------------------
Reporter: | Owner: cornedbee
spacecabooie@⦠| Status: assigned
Type: Bugs | Component: property_tree
Milestone: To Be | Severity: Showstopper
Determined | Keywords: rapidxml, memory_pool,
Version: Boost | allocate_node, m_static_memory, multi-threaded
1.54.0 |
Resolution: |
-------------------------+-------------------------------------------------
Changes (by cornedbee):
* status: new => assigned
Comment:
Can you show a minimal compilable example that, at least on your machine,
exhibits this issue? Simple inspection of the code shows that
read_xml_internal allocates the xml_document on the stack. xml_document
inherits from (and thus embeds) the memory_pool, and the m_static_memory
array is a normal member of that class. In other words, the pool *is* in
fact on the stack, and no sharing should occur.
I'm inclined to say that this is a problem of your larger application, and
not of PropertyTree.
However, there is another option: you're saying MIPS, so I assume that
you're talking about a machine with very limited memory, and also very
little protection. This static array, by default, occupies 64k of stack
space. Is it possible that you're simply observing a stack overflow that
isn't properly diagnosed, and the static buffer overlays the stack of
another thread?
Please try redefining BOOST_PROPERTY_TREE_RAPIDXML_STATIC_POOL_SIZE to a
smaller value in your project and see if that fixes the problem.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9224#comment:1> 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:15 UTC