[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 17:37:40 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)

At Tue, 10 Feb 2009 11:58:10 +0200 (EET),
M Joonas Pihlaja wrote:
> I'm treating them as byte strings and storing those in hash 
> tables.  The hash function touches the uninitialised memory. The 
> context is that I'm exposing the rng state array to Lua in a 
> mini-GSL<->Lua binding I'm writing, where byte strings are 
> conventionally exposed as language level strings.

For now, I'd suggest that you clear the struct in your code with a
memset() after calling the gsl_rng_alloc() function, and then call
gsl_rng_set(r,0) to reinitialize it.

I may change the behavior of GSL to be what you want in the future but
I need to think about it more.

Brian Gough

Support freedom by joining the FSF!

reply via email to

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