Re: [Boost-bugs] [Boost C++ Libraries] #11229: vector incorrectly copies move-only objects using memcpy

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11229: vector incorrectly copies move-only objects using memcpy
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-02 14:56:10


#11229: vector incorrectly copies move-only objects using memcpy
-------------------------------+------------------------
  Reporter: joseph.thomson@… | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: move
   Version: Boost 1.58.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+------------------------

Comment (by anonymous):

 Cool, that clears up what boost::has_trivial_copy means, and but then we
 still have your comment here right:

 Replying to [comment:3 joseph.thomson@…]:
> The is_memtransfer_copy_constructible and is_memtransfer_copy_assignable
 functions, as far as I can tell, perform the same function as
 is_trivially_copy_constructible and is_trivially_copy_assignable, but they
 still have incorrect implementations which rely only on
 boost::has_trivial_copy and boost::has_trivial_assign. Surely you need to
 change the implementation of these functions to fix the problem?

 Because now although I'm happy I understand what {{{has_trivial_copy}}}
 should do I'm still a bit at a loss for which combinations of boost and
 compiler a {{{boost::vector}}} of {{{unique_ptr}}} will result in double
 free.

 As far as I understand:

 * GCC 4.7 & 4.8 are fine (because their intrinsic is broken)
 * GCC 4.9 with boost 1.58 is susceptible to the problem
 * Clang in fact is fine (but for the wrong reason)

 * GCC 4.9 with boost 1.59 (fixed or not?)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11229#comment:12>
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:19 UTC