Version: (using KDE KDE 3.1) See the following for reproducing and explanation: http://www.sqlite.org/cvstrac/tktview?tn=535,3 and http://www.sqlite.org/cvstrac/tktview?tn=536,3
Subject: Re: New: valgrind reports wrongfully, unaddressable byte and uninitialised value in sqlite > http://www.sqlite.org/cvstrac/tktview?tn=535,3 ==3746== Use of uninitialised value of size 4 ==3746== at 0x804EE3D: randomByte (./src/random.c:70) The obvious conclusion from this is that k[i] is not initialised. Are you sure sqliteOsRandomSeed(k) (line 63) fills it in correctly? > and http://www.sqlite.org/cvstrac/tktview?tn=536,3 > Wrong memory access. This is a general library problem. Read Valgrind's message more carefully. ==10597== Syscall param write(buf) contains uninitialised or unaddressable byte(s) ^^^^^^^^^^^^^ Most probably you are putting uninitialised data in that buffer and then doing sqliteOsWrite on it.
I checked the code in sqlite and you are right about that k[i] was not properly initialised. Thank you! Valgrind is likely right about the unaddressable byte(s) problem as well. Closing this bug..