Hi,
This will crash SQLite 3.7.4 and 3.6.22:
CREATE VIRTUAL TABLE f USING fts3 (t TEXT, tokenize=icu);
insert into f (docid) values (1);
insert into f (docid) values (2);
insert into f (docid) values (3);
insert into f (docid) values (4);
update f set t = 'test' where docid = 3;
Here is the backtrace:
#0 __strlen_sse2 () at ../sysdeps/i386/i686/multiarch/strlen.S:99
#1 0x080d0b6a in icuOpen (pTokenizer=0x838f538, zInput=0x0, nInput=-1,
ppCursor=0xbfac0188) at sqlite3.c:122808
#2 0x080c9523 in fts3PendingTermsAdd (p=0x8390e20, zText=0x0, iCol=-1,
pnWord=0x838f508) at sqlite3.c:114945
#3 0x080c9b19 in fts3DeleteTerms (pRC=0xbfac0248, p=0x8390e20,
apVal=0x8390780, aSz=0x838f508) at sqlite3.c:115157
#4 0x080cd2be in sqlite3Fts3UpdateMethod (pVtab=0x8390e20, nArg=5,
apVal=0x8390780, pRowid=0xbfac03a0) at sqlite3.c:117228
#5 0x080c502b in fts3UpdateMethod (pVtab=0x8390e20, nArg=5,
apVal=0x8390780, pRowid=0xbfac03a0) at sqlite3.c:111228
#6 0x08083d87 in sqlite3VdbeExec (p=0x8392e10) at sqlite3.c:66140
#7 0x08079a23 in sqlite3Step (p=0x8392e10) at sqlite3.c:58704
#8 0x08079bbd in sqlite3_step (pStmt=0x8392e10) at sqlite3.c:58768
#9 0x0804ba09 in shell_exec (db=0x83819c0, zSql=0x8391660 "update f set
t = 'test' where docid = 3;", xCallback=0x804a381 <shell_callback>,
pArg=0xbfac0678, pzErrMsg=0xbfac0594) at shell.c:1099
#10 0x0804f9cd in process_input (p=0xbfac0678, in=0x0) at shell.c:2339
#11 0x08050785 in main (argc=2, argv=0xbfac1c54) at shell.c:2721
In icuOpen() it crashes at:
if( nInput<0 ){
nInput = strlen(zInput);
}
here zInput is NULL. It's read from the updated row in fts3DeleteTerms
using sqlite3_column_text and is NULL since the column has NULL value as
far as I understand.
I've modified shell.c from the SQLite distribution to load
libSqliteIcu.so using sqlite3_load_extension() because it can't be
loaded with SELECT load_extension() but the crash also occured without
libSqliteIcu.so loaded.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users