I am interested in this as I have bug that I am sure is to do with some sort of memory problem. It only occurs when I run a procedure defined with sqlite3_create_function. This procedure is not in sqlite3.dll but in a VB6 ActiveX dll. I use the unaltered Windows sqlite3.dll. My question is if there is ever any need in this situation to run one of the sqlite3 memory procedures, that is sqlite3_free, sqlite3_malloc or sqlite3_realloc? Currently I am not using this anywhere in my VB6 code. Should I?
RBS On Thu, Dec 24, 2015 at 4:12 PM, Dan Kennedy <danielk1977 at gmail.com> wrote: > On 12/24/2015 05:02 PM, santosh dasimanth wrote: > >> Hi All, >> I am working on Sqlite in multi threaded environment on ARM v7 platform. >> >> I am facing problems with malloc() function returning segmentation fault. >> The problem is not frequent but out of 100 times am getting this once. >> >> The backtrace is pasted below. >> >> (gdb) bt >> #0 0x4038eb18 in malloc () from /lib/libc.so.0 >> #1 0x401e0758 in sqlite3MallocRaw () from /pfrm2.0/lib/libsqlite3.so.0 >> #2 0x401e08a8 in sqlite3Malloc () from /pfrm2.0/lib/libsqlite3.so.0 >> #3 0x401e6254 in sqlite3VdbeCreate () from /pfrm2.0/lib/libsqlite3.so.0 >> #4 0x401d99cc in sqlite3GetVdbe () from /pfrm2.0/lib/libsqlite3.so.0 >> #5 0x401bd780 in sqlite3FinishCoding () from /pfrm2.0/lib/libsqlite3.so.0 >> #6 0x401d2464 in sqlite3Parser () from /pfrm2.0/lib/libsqlite3.so.0 >> #7 0x401dd664 in sqlite3RunParser () from /pfrm2.0/lib/libsqlite3.so.0 >> #8 0x401d650c in sqlite3Prepare () from /pfrm2.0/lib/libsqlite3.so.0 >> #9 0x401d69a4 in sqlite3_prepare () from /pfrm2.0/lib/libsqlite3.so.0 >> #10 0x401ed5c0 in sqlite3_exec () from /pfrm2.0/lib/libsqlite3.so.0 >> #11 0x401d5dbc in sqlite3InitCallback () from /pfrm2.0/lib/libsqlite3.so.0 >> #12 0x401ed6f8 in sqlite3_exec () from /pfrm2.0/lib/libsqlite3.so.0 >> #13 0x401d6184 in ?? () from /pfrm2.0/lib/libsqlite3.so.0 >> >> The traces are pointing to different functions when I hit the issue at >> times. >> Please let me know if anyone of people faced this problem before with >> sqlite. >> > > You have a corrupted heap in your application. Usually this is caused by > calling free() or similar on a pointer that you should not have, but can > also be due to large buffer overwrites and so on. > > If possible, run your application under valgrind - either on the ARM > platform or on a workstation. It will very likely tell you what is going > wrong. > > http://valgrind.org/ > > Dan. > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >

