[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] Uninitialized bytes in RNG state.
From: |
Julian Seward |
Subject: |
Re: [Bug-gsl] Uninitialized bytes in RNG state. |
Date: |
Tue, 10 Feb 2009 11:49:04 +0000 |
User-agent: |
KMail/1.9.9 |
> 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.
Minor side comment that might make this kind of thing easier to track
down. Valgrind versions 3.4.0 and later have a new option,
--track-origins=yes, which (at some performance cost) will tell you
the original source of uninitialised values. This can be very helpful.
J