Subject: [Boost-bugs] [Boost C++ Libraries] #3957: De-serialization of shared_ptrs derived from enable_shared_from_this fail
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-23 19:58:14
#3957: De-serialization of shared_ptrs derived from enable_shared_from_this fail
---------------------------------------------------------------+------------
Reporter: Carus V. (Bud) Clarke <carus.v.clarke@â¦> | Owner: ramey
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: serialization
Version: Boost 1.42.0 | Severity: Problem
Keywords: |
---------------------------------------------------------------+------------
De-serialization of shared_ptrs derived from enable_shared_from_this fails
to initialize the base enable_shared_from_this objects, which causes a
program crash when shared_from_this() is called. The root cause seems to
be that a shared_pointer<void> is created inside file
shared_ptr_helper.cpp, instead of a shared_ptr<T>, with T being the
original class. This causes the non-enable_shared_from_this constructor
to be called. I worked around this by moving the initial construction of
the shared_ptr to file shared_ptr_helper.hpp.
A patch file is attached and also a test program, modified from one
originally written by Alexander Gutenev.
Thanks,
Bud Clarke
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3957> 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:02 UTC