id summary reporter owner description type status milestone component version severity resolution keywords cc 4445 boost:math::float_advance( 0.0, 2 ) stack overflows if denormal numbers are set to zero Emmet Spier John Maddock " If denormal numbers are set to be zero on the processor (register MXCSR bit 6 set) then float_distance( 0.0, any number that is not 1 ) will enter invoke a function recurse which fails to exit and the program will crash with a stack overflow. Ultimately given the current code, this is because boost::math::sign( denormal number ) == 0 as opposed to the sign of the denormal number. However, behaviour of this function with denormal numbers really ought to be defined and documented. Possibly a test to see if denormal numbers are disabled needs to be done this case handled appropriately. Example code, built with optimisations enabled #include #include int main() { double thisWillWork = boost::math::float_advance( 0.0, 2 ); ippSetDenormAreZeros(1); // or set MXCSR bit six directly double thisWillStackOverFlow = boost::math::float_advance( 0.0, 2 ); return 0; }" Bugs closed Boost 1.44.0 math Boost 1.40.0 Showstopper fixed