Compile the attached C program and run it in a directory with the
attached test.db.
kiwiw:~/sqlite3/x terpstra$ ls -l bug.c test.db
-rw-r--r-- 1 terpstra terpstra 976 Feb 18 00:09 bug.c
-rw-r--r-- 1 terpstra terpstra 6144 Feb 18 00:09 test.db
kiwiw:~/sqlite3/x terpstra$ gcc -Wall -O0 -g bug.c -o bug -lsqlite3
kiwiw:~/sqlite3/x terpstra$ ./bug
Failing step: 17 - library routine called out of sequence
Invoking the finalizer for query 1 inside the authorization function
leads the step of query 2 failing. As SQLite3 is supposed to be re-
entrant, recursively altering q1 should not affect q2.
I found this bug when running an SML program using the SQLite3
binding I'm working on. In that binding, queries are garbage
collected. During the authorizer callback into SML, the runtime
decided to recover memory. This led to finalizing a no-longer-used
query.
In case this mailing list drops my attachments again, find them also
here:
http://terpstra.ca/sqlite3/bug.c
http://terpstra.ca/sqlite3/test.db
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------