On 11/27/15, Harmen de Jong - CoachR Group B.V. <harmen at coachr.com> wrote: >> (1) Recompile with the following compile-time options: -DSQLITE_DEBUG >> -DSQLITE_OMIT_LOOKASIDE >> >> (2) Enable whatever AddressSanitizer tools >> (https://en.wikipedia.org/wiki/AddressSanitizer) you have available on >> your platform, in addition to (1) above. >> >> (3) If you do not have an easily accessible address sanitizer utility, >> consider recompiling SQLite using -DSQLITE_MEMDEBUG (in > > addition to >> the compile-time options shown in (1) above). >> >> -- >> D. Richard Hipp > > @D. Richard Hipp: > We have recompiled SQLITE with the following options and have it up and > running now: > Recompiled with: -DSQLITE_DEBUG, -DSQLITE_OMIT_LOOKASIDE and > -DSQLITE_MEMDEBUG. > > It is clear to us why we have to compile with -DSQLITE_OMIT_LOOKASIDE, but > what about the other two options?
The lookaside memory allocator is a fast memory pool used by individual database connections for short-lived memory allocations. It makes SQLite run faster, but by bypassing the system malloc()/free() it can mask some types of heap corruption. Best to turn it off when dealing with suspected heap problems. > 1. What is the effect of -DSQLITE_DEBUG? This option enables assert() statements. If there are any internal inconsistencies within SQLite, they are likely to be caught by the numerous assert() statements in the code. > 2. What is the effect of -DSQLITE_MEMDEBUG? This adds a wrapper around system malloc()/free() that works to test the integrity of the heap. It is not a great wrapper. (Things like AddressSanitizer are better.) But it is better than nothing. Errors are printed if heap problems are detected. > Could we expect any extra output or extra info while analyzing crash dumps > by using these compile-time options? > > >> Can you run >> >> PRAGMA integrity_check >> >> on the database ? If you don't want to tie up your live copy, copy it >> somewhere else and run the PRAGMA on the copy. >> >> Simon. > > @Simon: The result of this pragma was "Ok". > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp drh at sqlite.org