Hi, 

It would be very helpful, if you can provide us some info on the below issues 
(Memory leak & Invalid write errors, found from valgrind tool on Sqlite3 
library usage).

Executed some Select & Update queries. 
Don't know if these issue got fixed in the latest sqlite3 library-

Sorry for the long mail. Attached below the callflows, for to give more 
detailed info.

Thanks,
Kishore

Invalid read/write error -

1.
==22067== Invalid read of size 1
==22067==    at 0x40367D3: get_field_type (in 
/usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x4036C7B: find_result_field_types (in 
/usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40372B3: dbd_query (in /usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40803FA: dbi_conn_query (in /usr/lib/libdbi.so.0.0.5)
==22067==    by 0x40414BF: start_thread (in /lib/i686/cmov/libpthread-2.7.so)
==22067==    by 0x41686DD: clone (in /lib/i686/cmov/libc-2.7.so)
==22067==  Address 0x45786b4 is 0 bytes after a block of size 1,740 alloc'd


2.
==22067== Invalid write of size 1
==22067==    at 0x40367D8: get_field_type (in 
/usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x4036C7B: find_result_field_types (in 
/usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40372B3: dbd_query (in /usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40803FA: dbi_conn_query (in /usr/lib/libdbi.so.0.0.5)
==22067==    by 0x406858E: ExecuteSelectQuery (Ran select query here)
==22067==    by 0x41686DD: clone (in /lib/i686/cmov/libc-2.7.so)
==22067==  Address 0x4578d3c is not stack'd, malloc'd or (recently) free'd



Definite Memory leaks:-
1.
==22067== 64 bytes in 4 blocks are definitely lost in loss record 25 of 67
==22067==    at 0x4023E8C: realloc (vg_replace_malloc.c:429)
==22067==    by 0x7E652E4: sqlite3MemRealloc (sqlite3.c:12116)
==22067==    by 0x7E2F95F: sqlite3Realloc (sqlite3.c:15503)
==22067==    by 0x7E6C041: sqlite3_get_table (sqlite3.c:78723)
==22067==    by 0x4036BED: find_result_field_types (in 
/usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40372B3: dbd_query (in /usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40803FA: dbi_conn_query (in /usr/lib/libdbi.so.0.0.5)
==22067==    by 0x406858E: ExecuteSelectQuery (Select query call)

2.
==22067==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
==22067==    by 0x7E6536A: sqlite3MemMalloc (sqlite3.c:12077)
==22067==    by 0x7E2F5FB: mallocWithAlarm (sqlite3.c:15257)
==22067==    by 0x7E2F6E7: sqlite3Malloc (sqlite3.c:15288)
==22067==    by 0x7E6BE58: sqlite3_exec (sqlite3.c:71018)
==22067==    by 0x7E6BF67: sqlite3_get_table (sqlite3.c:78701)
==22067==    by 0x4037214: dbd_query (in /usr/local/lib/dbd/libdbdsqlite3.so)
==22067==    by 0x40803FA: dbi_conn_query (in /usr/lib/libdbi.so.0.0.5)
==22067==    by 0x4069EEE: ExecuteUpdateQuery (dbInterface.c:625)


Possible Memory leaks:-

1.
==22067== 183,608 bytes in 427 blocks are possibly lost in loss record 66 of 67
==22067==    at 0x4023E8C: realloc (vg_replace_malloc.c:429)
==22067==    by 0x7E652E4: sqlite3MemRealloc (sqlite3.c:12116)
==22067==    by 0x7E2F95F: sqlite3Realloc (sqlite3.c:15503)
==22067==    by 0x7E42AC2: sqlite3DbRealloc (sqlite3.c:15626)
==22067==    by 0x7E6A106: sqlite3Parser (sqlite3.c:63874)
==22067==    by 0x7E6A952: sqlite3RunParser (sqlite3.c:89041)
==22067==    by 0x7E6AF6C: sqlite3LockAndPrepare (sqlite3.c:74040)
==22067==    by 0x7E6BB82: sqlite3_exec (sqlite3.c:70941)
==22067==    by 0x7E6C196: sqlite3InitCallback (sqlite3.c:73533)
==22067==    by 0x7E6BD55: sqlite3_exec (sqlite3.c:70986)
==22067==    by 0x7E6C5BB: sqlite3InitOne (sqlite3.c:73777)
==22067==    by 0x7E6C869: sqlite3Init (sqlite3.c:73844)
==22067== 
==22067== 

2.
==22067== 4,545,024 bytes in 49,232 blocks are possibly lost in loss record 67 
of 67
==22067==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
==22067==    by 0x7E6536A: sqlite3MemMalloc (sqlite3.c:12077)
==22067==    by 0x7E2F5FB: mallocWithAlarm (sqlite3.c:15257)
==22067==    by 0x7E2F6E7: sqlite3Malloc (sqlite3.c:15288)
==22067==    by 0x7E31207: pcache1Alloc (sqlite3.c:29244)
==22067==    by 0x7E46589: pcache1Fetch (sqlite3.c:29278)
==22067==    by 0x7E3DD16: sqlite3PcacheFetch (sqlite3.c:28725)
==22067==    by 0x7E50750: sqlite3PagerAcquire (sqlite3.c:34056)
==22067==    by 0x7E50D23: sqlite3BtreeGetPage (sqlite3.c:37796)
==22067==    by 0x7E50DAF: getAndInitPage (sqlite3.c:37862)
==22067==    by 0x7E55589: sqlite3BtreeCursor (sqlite3.c:39587)
==22067==    by 0x7E78C5A: sqlite3Step (sqlite3.c:52942)

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to