Boost logo

Boost Users :

From: Martin Wartens (martin.wartens_at_[hidden])
Date: 2004-03-16 10:00:51


There seems to be a bug in the fibonacci random generators. Only the smaller
lagged_fibonacci generators work. Code Sample (tested with VC7.1) follows. The
debugger says:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a
function call. This is usually a result of calling a function declared with
one calling convention with a function pointer declared with a different
calling convention.

//lagged_fibonacci4423 and smaller works,
//>=9689 fails
typedef boost::lagged_fibonacci9689 rng_type;
rng_type rng;
rng.seed((unsigned)time( NULL ));
boost::uniform_int<size_t> uni(0,len-1);
//crashes on this line.
boost::variate_generator<rng_type, boost::uniform_int<size_t> >
                die(rng, uni);


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net