Re: [Boost-bugs] [Boost C++ Libraries] #10005: erf_inv_initializer crashes under valgrind

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10005: erf_inv_initializer crashes under valgrind
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-21 11:08:28


#10005: erf_inv_initializer crashes under valgrind
---------------------------------------+-------------------------
  Reporter: Marcin Wojdyr <wojdyr@…> | Owner: johnmaddock
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: math
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------+-------------------------

Comment (by johnmaddock):

 I'm unable to reproduce on ubuntu with any combination of -ON and -g and
 either latest clang or gcc-5.1 or 4.9.2 and current develop branch (which
 should be the same as 1.60). Which is not to say that some folks won't
 experience this still.

 The essential issue is that valgrind doesn't support long double fully, so
 finite long doubles can get truncated to zero or infinity and random
 points in the program (ie you can check that a variable is non-zero, and
 then in the next line when you go to actually use it, it's been magically
 truncated to zero. The result is that it completely breaks program
 logic).

 There are a couple of possible workarounds (other than choosing -O options
 carefully), to define:

 BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - which prevents any long double
 functions from being defined or used with Boost.Math, or else define:
 BOOST_MATH_PROMOTE_DOUBLE_POLICY=false, which prevents double functions
 from being evaluated at long double precision internally, but otherwise
 retains the long double implementations if they're needed.

 Both of these will reduce precision slightly, and both will typically
 improve performance on 64-bit hardware.

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