[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Uninitialized bytes in RNG state.

From: Brian Gough
Subject: Re: [Bug-gsl] Uninitialized bytes in RNG state.
Date: Tue, 10 Feb 2009 09:01:14 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)

At Tue, 10 Feb 2009 01:42:56 +0200 (EET),
M Joonas Pihlaja wrote:
> Valgrind complains about using uninitialised memory when 
> accessing all gsl_rng_size() bytes of the gsl_rng_state() arrays 
> returned by some rng types.
> One example is mt19937 whose state has lots of unsigned longs 
> followed by an int.  On a 64 bit machine the size of the state is 
> 5000 bytes of which 4 bytes are pad bytes inserted by the 
> compiler due to the mix of int/ulong.

Thanks, I understand now.  

Normally it isn't necessary to access the state directly, what do you
want to do with it?  Maybe there is some way to achieve the same
result that avoids Valgrind errors.

I'm wary of clearing every struct by default as initialising every bit
of memory could hide other errors in the future.

Brian Gough

reply via email to

[Prev in Thread] Current Thread [Next in Thread]