id summary reporter owner description type status milestone component version severity resolution keywords cc 10005 erf_inv_initializer crashes under valgrind Marcin Wojdyr John Maddock "It was reported before on the mailing list: http://lists.boost.org/boost-users/2012/08/75711.php and I assume it's because valgrind doesn't support long doubles: https://bugs.kde.org/show_bug.cgi?id=197915 Somehow erfc_inv is called in this place and the argument is then found to be 0: {{{ #!cpp // Some compilers choke on constants that would underflow, even in code that isn't instantiated // so try and filter these cases out in the preprocessor: #if LDBL_MAX_10_EXP >= 800 if(static_cast(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-800)) != 0) boost::math::erfc_inv(static_cast(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-800)), Policy()); }}} So an exception is thrown during initialization. While it may not be a bug, valgrind is extremely useful and it would be nice to have a workaround. I don't understand why erf_inv and erfc_inv are called with these arguments in `erf_inv_initializer<>::init::do_init()`, so I'm not sure what workaround is safe. Here is a full traceback: {{{ #0 0x00000036fb435c39 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00000036fb437348 in __GI_abort () at abort.c:89 #2 0x00000036ff860f85 in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95 #3 0x00000036ff85eee6 in __cxxabiv1::__terminate (handler=) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:38 #4 0x00000036ff85ef13 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48 #5 0x00000036ff85f13f in __cxxabiv1::__cxa_throw (obj=0x526e490, tinfo=, dest=) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:84 #6 0x0000000004cb1541 in boost::throw_exception (e=...) at /usr/include/boost/throw_exception.hpp:67 #7 0x0000000004cb7f28 in boost::math::policies::detail::raise_error ( function=0x4d2d338 ""boost::math::erfc_inv<%1%>(%1%, %1%)"", message=0x4d1bf8e ""Overflow Error"") at /usr/include/boost/math/policies/error_handling.hpp:95 #8 0x0000000004cb7f98 in boost::math::policies::detail::raise_overflow_error (function=, message=) at /usr/include/boost/math/policies/error_handling.hpp:211 #9 0x0000000004cdf17e in raise_overflow_error, boost::math::policies::promote_double, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> > (message=0x0, function=) at /usr/include/boost/math/policies/error_handling.hpp:515 #10 boost::math::erfc_inv, boost::math::policies::promote_double, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> > (z=0, z@entry=0, pol=...) at /usr/include/boost/math/special_functions/detail/erf_inv.hpp:383 #11 0x0000000004cdfaae in boost::math::detail::erf_inv_initializer, boost::math::policies::promote_double, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >::init::do_init () at /usr/include/boost/math/special_functions/detail/erf_inv.hpp:347 #12 0x0000000004cda34b in init (this=) at /usr/include/boost/math/special_functions/detail/erf_inv.hpp:332 #13 __static_initialization_and_destruction_0 ( __initialize_p=__initialize_p@entry=1, __priority=__priority@entry=65535) at /usr/include/boost/math/special_functions/detail/erf_inv.hpp:367 #14 0x0000000004cda463 in _GLOBAL__sub_I_fit.cpp(void) () at ../../fityk/fit.cpp:643 #15 0x00000036fb00f2ea in call_init (l=, argc=argc@entry=1, argv=argv@entry=0xffefffc48, env=env@entry=0xffefffc58) at dl-init.c:82 #16 0x00000036fb00f3d3 in call_init (env=, argv=, argc=, l=) at dl-init.c:34 #17 _dl_init (main_map=0x36fb221168, argc=1, argv=0xffefffc48, env=0xffefffc58) at dl-init.c:130 #18 0x00000036fb00122a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 }}}" Bugs reopened To Be Determined math Boost 1.54.0 Problem