Hi,

i'm using the current SQLite from cvs with

 gcc 3.3.1
 Linux 2.4.21-199

and i think it is great fun coding with SQLite.

When i test my code with valgrind i get following error:

======================================================================
==23150== ERROR SUMMARY: 12 errors from 1 contexts (suppressed: 1 from 1)
==23150==
==23150== 12 errors in context 1 of 1:
==23150== Syscall param write(buf) contains uninitialised or unaddressable byte(s)
==23150==    at 0x4039A108: __GI___libc_write (in /lib/i686/libc.so.6)
==23150==    by 0x4024533E: sqliteOsWrite (os.c:1000)
==23150==    by 0x402470AE: pager_write_pagelist (pager.c:1262)
==23150==    by 0x402483E2: sqlitepager_commit (pager.c:2020)
==23150==  Address 0x415E5252 is 142 bytes inside a block of size 1364 alloc'd
==23150==    at 0x4002CEAF: malloc (vg_replace_malloc.c:160)
==23150==    by 0x40254A1C: sqliteMallocRaw (util.c:268)
==23150==    by 0x402471EC: sqlitepager_get (pager.c:1387)
==23150==    by 0x40230BCA: newDatabase (btree.c:840)
--23150--
--23150-- supp:    1 __pthread_mutex_unlock/_IO_funlockfile
==23150==
==23150== IN SUMMARY: 12 errors from 1 contexts (suppressed: 1 from 1)
==23150==
==23150== malloc/free: in use at exit: 128 bytes in 2 blocks.
==23150== malloc/free: 1946 allocs, 1944 frees, 447323 bytes allocated.
==23150==
==23150== searching for pointers to 2 not-freed blocks.
==23150== checked 4115340 bytes.
==23150==
==23150==
==23150== 128 bytes in 2 blocks are still reachable in loss record 1 of 1
==23150==    at 0x4002CEAF: malloc (vg_replace_malloc.c:160)
==23150==    by 0x402549BD: sqliteMalloc (util.c:254)
==23150==    by 0x40240E15: rehash (hash.c:172)
==23150==    by 0x40241311: sqliteHashInsert (hash.c:344)
==23150==
==23150== LEAK SUMMARY:
==23150==    definitely lost: 0 bytes in 0 blocks.
==23150==    possibly lost:   0 bytes in 0 blocks.
==23150==    still reachable: 128 bytes in 2 blocks.
==23150==         suppressed: 0 bytes in 0 blocks.
--23150--     TT/TC: 0 tc sectors discarded.
--23150--            5986 chainings, 0 unchainings.
--23150-- translate: new     6886 (116999 -> 1604243; ratio 137:10)
======================================================================

Note the the only change i have made to the cvs from today is:

--------------------------------------------
RCS file: /sqlite/sqlite/src/os.c,v
retrieving revision 1.66
diff -r1.66 os.c
19a20,21
> #define THREADSAFE 1
>
--------------------------------------------

so you need to correct the line number in the above os.c error.

Is this an error in my code using SQLite or is this a problem in SQLite?

thanks,

Marcel

--
http://www.xmlBlaster.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to