Re: [Boost-bugs] [Boost C++ Libraries] #8667: gmp_int wrongly assumes m_data is initialised on copy assignment

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8667: gmp_int wrongly assumes m_data is initialised on copy assignment
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-07 18:21:55


#8667: gmp_int wrongly assumes m_data is initialised on copy assignment
-------------------------------+----------------------------
  Reporter: andrea.bedini@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by johnmaddock):

>I reckon the same problem might be presents in other places in gmp.hpp.
 Wouldn't also be better to replace o.m_data[0]._mp_d = 0 with a proper
 deinitialisation ?

 Then it would do a copy, rather than a move.

 Looks like a straight cut-and-paste error in the code to me, the other
 assignment operators have it right I believe, can you try the attached?

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