[Boost-bugs] [Boost C++ Libraries] #4394: assert in void_caster

Subject: [Boost-bugs] [Boost C++ Libraries] #4394: assert in void_caster
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-29 18:30:21


#4394: assert in void_caster
-----------------------------------------+----------------------------------
 Reporter: alexander@… | Owner: ramey
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: serialization
  Version: Boost 1.43.0 | Severity: Problem
 Keywords: serialization assert |
-----------------------------------------+----------------------------------
 There is the static library with two classes, "base" and "derived".


 {{{
 class base
 {
 public:
    base():a(0){};
    virtual ~base(){};

 private:
    friend class boost::serialization::access;
    template<class Archive>
    void serialize(Archive & ar, const unsigned int version)
    {
       ar & a;
    }

 private:
    int a;
 };

 class derived: public base
 {
 public:
    derived():b(0){};
    virtual ~derived(){};

 private:
    friend class boost::serialization::access;
    template<class Archive>
    void serialize(Archive & ar, const unsigned int version)
    {
       ar & boost::serialization::base_object<base>(*this);
       ar & b;
    }

 private:
    int b;
 };

 }}}

 This static library is linked to two dynamic libraries. For example,
 dll_a.dll and dll_b.dll. When I try to load those dlls in my application
 (via LoadLibrary), I get assert in void_cast.cpp (225):


 {{{
     std::pair<void_cast_detail::set_type::const_iterator, bool> result;
     result = s.insert(this);
     assert(result.second);

 }}}

 Sample project is available upon request.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4394>
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:03 UTC