artemp/trac2github — Issue #855: sqlite "out of memory" error
Author: artemp
Created: 2011-10-09 20:53:19+00:00
State: open
Labels: Core_Library

Depending on the sqlite3 version being used it appears easy to trigger undefined behavior with the usage of sqlite3_open_v2.

After fixing this problem on osx with the latest sqlite release, on a different osx machine with the system sqlite:

{{{
$ sqlite3 --version
3.7.5
}}}

I get this during builds:

{{{

g++ -o plugins/input/sqlite/sqlite_featureset.os -c -DHAVE_JPEG -ansi -Wall -ftemplate-depth-200 -DDARWIN -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -fPIC -Iagg/include -I. -Iinclude -I/usr/local/Cellar/gdal/1.8.1/include -I/usr/local/include -I/usr/include -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/include/libxml2 plugins/input/sqlite/sqlite_featureset.cpp
In file included from plugins/input/sqlite/sqlite_featureset.hpp:37,
from plugins/input/sqlite/sqlite_featureset.cpp:38:
plugins/input/sqlite/sqlite_types.hpp: In constructor ‘sqlite_connection::sqlite_connection(const std::string&)’:
plugins/input/sqlite/sqlite_types.hpp:138: warning: ‘sqlite3_enable_shared_cache’ is deprecated (declared at /usr/include/sqlite3.h:4275)
plugins/input/sqlite/sqlite_types.hpp:138: warning: ‘sqlite3_enable_shared_cache’ is deprecated (declared at /usr/include/sqlite3.h:4275)
In file included from plugins/input/sqlite/sqlite_datasource.hpp:38,
from plugins/input/sqlite/sqlite_datasource.cpp:24:
}}}

And failures when opening db's.