On May 29, 2009, at 4:37 PM, Tim Jenness wrote:
>
> ==32737== Uninitialised value was created by a stack allocation
> ==32737== at 0x117F4594: rec1_unlock_slot (rec1_unlock_slot.c:30)
>
> and it seems that rec1_unlock_slot is at fault for it (the above is
> just from doing stats on comwest.sdf).
initialising buf[REC__SZBLK] to zeroes makes the warning go away. In
fact, the version of valgrind in svn gives me this additional snippet:
==71298== Address 0x10424a6bf is 31 bytes inside a block of size
4,096 alloc'd
and if I simply
buf[31] = 0;
warning is fixed.
So I'm guessing that rec1_pack_hcb.c has a bug in it. It never seems
to initialise phcb[31] even though it fills all the other unused slots
with explicit 0s. I assume it was just an oversight by Brian in 64-bit
mode (it is zeroed in 32-bit mode). Brian, should I just add a
phcb[31] = 0 ?
--
Tim Jenness
Joint Astronomy Centre
|