Assertion failure in zipfileAddEntry function
(1) By Song Liu (songliu) on 2023-05-03 00:45:46 [source]
I found an assertion failure while SQLite (latest, 92ade220dcf5c1b7) executes the following queries.
CREATE VIRTUAL TABLE v0 USING zipfile(malform);
SAVEPOINT y;
DELETE FROM v0 WHERE 9;
INSERT INTO v0 DEFAULT VALUES RETURNING 0;
NOTE: You need to run the query twice to trigger the assertion failure. The first run will create a zip file malform
and the second run aborts.
Here are the outputs:
sqlite3-asan: shell.c:9168: zipfileAddEntry: Assertion `(pTab->pFirstEntry==0)==(pTab->pLastEntry==0)' failed.
My compilation flags:
export CFLAGS="-g -DSQLITE_DEBUG
-DSQLITE_ENABLE_TREETRACE
-DSQLITE_ENABLE_WHERETRACE
-DSQLITE_ENABLE_CURSOR_HINTS
-DSQLITE_COUNTOFVIEW_OPTIMIZATION
-DSQLITE_ENABLE_STAT4"
./configure --enable-all --enable-debug --disable-shared && make