Bug 71523 - valgrind reports wrongfully, unaddressable byte and uninitialised value in sqlite
Summary: valgrind reports wrongfully, unaddressable byte and uninitialised value in sq...
Status: RESOLVED WORKSFORME
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-30 23:22 UTC by zzzzzzz
Modified: 2003-12-31 04:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zzzzzzz 2003-12-30 23:22:06 UTC
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
Comment 1 Julian Seward 2003-12-31 00:52:43 UTC
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.

Comment 2 zzzzzzz 2003-12-31 04:17:44 UTC
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..