dan
6aafd74853
Avoid some cases of signed integer overflow in fts5 by casting to unsigned values.
...
FossilOrigin-Name: 46a78c8c0ed518c4521e6e0bdebeb065bab07076abc444775002e7f4361d2242
2022-08-08 19:29:53 +00:00
dan
cf2ad7ae36
Remove a few unsuitable scripts from the "veryquick" test suite. Also have every second testrunner.tcl process favour running test scripts that contain text like "testrunner: slow" before any others.
...
FossilOrigin-Name: 22d280a5cd395abbedcfffbac3d3b3a614c327be25763ca380c1338a2a7bd33a
2022-07-18 19:32:30 +00:00
dan
f703b42dc4
Update the expected error messages in some OOM test cases to account for [44d77a7f807].
...
FossilOrigin-Name: b3d6b3c3fc68dca7e20418eefa35ce3b583322b884b88a11c6773419f027a7a4
2022-07-11 21:40:34 +00:00
drh
de7a820fd0
Minor typo fix in a comment, for the benefit of broken IDE syntax highlighters.
...
FossilOrigin-Name: 680ccecbc839373194ed2dcc1053e25512d9ea3f12f8c8963cb8fbd1a034d2f8
2022-04-29 12:09:43 +00:00
drh
c381056e6d
Fix harmless compiler warnings.
...
FossilOrigin-Name: 61095b5bcb5c30d29f03efa5b4809e3a0b780ed57e35227c292aab9dd1cfe3f6
2022-04-07 10:11:35 +00:00
dan
7ef4d75bd2
Fix a case in fts5 where a corrupt database could cause a crash.
...
FossilOrigin-Name: 5e95df261cce275adb5b2226e9584f4c389bb0d53c3b4feafd5a14be8d02ce63
2022-03-11 12:02:18 +00:00
drh
7d44b22d45
Fix test cases so that they all still work even with -DSQLITE_DQS=0.
...
FossilOrigin-Name: 4883776669ee2f2310ea82b0d6df4d008eebaa7cb252102539cf21a635402ebb
2022-01-16 19:11:13 +00:00
drh
a6ca90c38c
Attempt to fix a harmless compiler warning in FTS5.
...
FossilOrigin-Name: 8e619c21e2326be1538b60908e7cd211558ec840835c6eb69e768eb190e1fd0b
2022-01-01 19:55:29 +00:00
dan
c436b3056d
Fix an OOB read that could occur in fts5 when processing corrupt records.
...
FossilOrigin-Name: bb9b1a15f7e80483162049dfd981d059dc69d03348b521f7ac164a8cd3ae3cc4
2021-12-06 18:57:02 +00:00
drh
913306a53a
Improved defenses against integer overflow when computing the size of a
...
memory allocations. No bugs were fixed here. But perhaps future bugs will
be prevented.
FossilOrigin-Name: eb878c01f317f09e8ef6b1bd2ec8d6d5cd6ce0bdfe9da7fa7d92d2047cc9d9e4
2021-11-26 17:10:18 +00:00
dan
76c3ae6848
Fix a broken assert() in fts5 that could fail if the snippet() function were used with a query phrase containing 0 tokens on a detail=none or detail=col table.
...
FossilOrigin-Name: 0a5b94b99cf45df759a59cb5fc62da111ca33f8c2614769a81930d72b51f093a
2021-11-02 07:32:13 +00:00
drh
134f544ab2
Fix a harmless scan-build warning in FTS5.
...
FossilOrigin-Name: 0bf42bb5611dc3f672cb898b8be245fd25f7a3862c1e0734effd18d75e812f22
2021-10-16 19:50:03 +00:00
dan
f7ff755651
Fix an assert() in fts5 that could fail with a corrupt database.
...
FossilOrigin-Name: e99979855de937ed5ee0994b180054501400bf8776fb70acd31786d2ba1ad49a
2021-10-16 13:59:08 +00:00
dan
33cf194218
Fix a signed integer overflow in fts5 leading to a segfault that could occur when processing corrupt records.
...
FossilOrigin-Name: 69a3ff0cc159cdf84a5367eaf708882ddeda4fa65c96a5b546ae4a0114f02cb7
2021-10-14 21:13:02 +00:00
drh
13ca72d011
Fix harmless compiler warnings, mostly caused by prior efforts to get static
...
analyzers to run without warnings.
FossilOrigin-Name: cddd3b382a118bb16be3a602ae711fe2c2a7d1c673dd30dd3977b67ee555e666
2021-10-05 18:59:05 +00:00
drh
d7ace22d8c
Fix more harmless static-analyzer warnings. As of this check-in, no warnings
...
are generated by scan-build for clang-6 or clang-10.
FossilOrigin-Name: a7835bead85b1b18a8affd9835240b0baf9c7af887196bbdcc3f5d58055042fc
2021-10-05 18:33:38 +00:00
drh
7a3b4451a1
Fixes for harmless static-analyzer warnings. This also makes the code easier
...
for humans to understand.
FossilOrigin-Name: 36177a62feeb4fa93ab6e3c6f4dbe1ddcf63bb02f93284abab979da0261b218e
2021-10-05 17:41:12 +00:00
drh
640574f61a
Small change to FTS5 to help static analyzers understand that it is not
...
dereferencing a NULL pointer.
FossilOrigin-Name: 0d853df1b19a0270b2cb0ebdf5df8067572f19ab9a82d047cb047f3f9e850348
2021-10-05 13:00:50 +00:00
drh
922c54206f
Some #defines somehow failed to get set correctly in the previous check-in.
...
Fixed here.
FossilOrigin-Name: 15bbdf9ac840a220f384411d3025ef22f949d310194b60bca8e6d6a759e6042e
2021-10-04 18:57:42 +00:00
drh
11a9ad5669
Fix harmless static analyzer warnings in sessions, rtree, fts3 and fts5.
...
Add the -DSQLITE_OMIT_AUXILIARY_SAFETY_CHECKS compile-time option to cause
ALWAYS() and NEVER() macros to be omitted from the build.
FossilOrigin-Name: 1c67f957fc77e37ce8f0d447c41ca975e8e79a35d332739c24a633649b5b0387
2021-10-04 18:21:14 +00:00
dan
adfb203a7d
Fix a buffer overread in fts5 that could occur when processing an "ORDER BY rowid DESC" query against corrupt database records.
...
FossilOrigin-Name: fe098a93340b8dac15752f1be4f681e2a591f7ae1a94b177f400ccd7ef638480
2021-10-01 15:05:19 +00:00
dan
415540ddaa
Fix an out-of-bounds read in fts5 that could occur when processing corrupt records.
...
FossilOrigin-Name: 9bbc01fb239b4aa752a56c584baa29655a3c845425d5c17d24a3939984d54fe2
2021-09-29 13:36:58 +00:00
drh
dd31c033c6
Fix harmless compiler warnings.
...
FossilOrigin-Name: d678ecca02698753d1b33e072566112e94ea36d0d3a8f4a24d2b09d131968d88
2021-09-22 14:43:35 +00:00
dan
eb84c6ef35
Fix a memory leak in fts5 that could occur when writing to an fts5 table that is being scanned by an fts5vocab cursor.
...
FossilOrigin-Name: 1183552de10b64a776874a23be8962c0693e5e0cd1a191ea8fa5d6a02b691e4a
2021-09-07 16:05:48 +00:00
dan
fb8ca7de0c
Fix a use-after-free error that could occur if an fts5 table is written while scanning it using an fts5vocab cursor.
...
FossilOrigin-Name: e751c2ec786b5c1a1c9640fdc3fde036879a2c32db2bd67fe7c72604780f67b8
2021-09-06 16:15:23 +00:00
drh
20de9f6cb1
Minor tweaks to various TCL build scripts so that they work even for TCL 8.4,
...
which is obsolete, but is also all that is available for some legacy platforms.
FossilOrigin-Name: 2269ce64f707c4a198fcb9a72933648ea61a80b4251024b8058ff28ad81b4917
2021-07-29 16:49:28 +00:00
dan
73983658c9
In defensive mode, allow statements that write to shadow tables to be prepared from with virtual-table xSync() calls.
...
FossilOrigin-Name: c8601d83fbecf84ca7991d339449b380deb5a7620dc84756a91c2880f030b423
2021-07-19 14:00:29 +00:00
dan
cc516af4cc
Instead of disallowing writes to fts5 tables if there are fts5vocab cursors open on them (commit [c49a6ed7]), abort any fts5vocab queries if the on-disk structure of the fts5 table changes.
...
FossilOrigin-Name: 9dbdc9001e3258e71ca995fbcdebf66ab95890ded87fa7125c6cb4bd43010aaf
2021-07-07 11:51:03 +00:00
dan
b9324fea07
Do not allow writes to an fts5 table if there are any open fts5vocab cursors.
...
FossilOrigin-Name: c49a6ed78a917d4972e048e2a9bbe4d400691f97ce7e022f0e4436ceaed7fb73
2021-07-05 19:01:09 +00:00
dan
90d3b24a16
Fix a memory leak in fts5 that could occur when processing a query containing multiple classes of error.
...
FossilOrigin-Name: 7c279670f544a5bb9733a88862d9e490062b07415cd790e0d6d1e2cb584d2007
2021-06-30 14:04:25 +00:00
dan
c629e21786
Fix an assert() in fts5 that might fail when dealing with corrupt records.
...
FossilOrigin-Name: 9e760e256089c0ebbf816a8de8b186f62e1ffcd6b8b0e76dab8387798cd4d0e1
2021-06-30 12:11:19 +00:00
dan
8d2a9c3b3a
Add defensive code to better handle corrupt records in fts5.
...
FossilOrigin-Name: a99c29b5efaf17e34506cda5ce017ec0112b3cb24bf8a2f1831f0c14a8aa8d30
2021-06-09 13:39:11 +00:00
drh
18f9be897d
Remove two assert()s in FTS5 that checks for database corruption right before
...
actual code does the same check.
dbsqlfuzz 9680db8f5338cb9b6060eb3a02d984555d4472e3.
FossilOrigin-Name: f3f82967b2e9fd4168d86300138ac4bbcd6ffd7a3ff5ecf20acdc29e5356ac3b
2021-06-08 23:46:59 +00:00
dan
bc85a51595
Fix a buffer overread that could occur in fts5 when handling corrupt records.
...
FossilOrigin-Name: 078962a2164a784b135bacee51ef10973dc2e30de04353d48698d0e72edd63d8
2021-06-07 17:36:57 +00:00
drh
ff9186137d
The fix in the previous check-in was only correct if the OOM occurs on
...
the initial allocation. This changes should make it correct for a resize
as well.
FossilOrigin-Name: 57087ab2f297e4d96da5b9f3b89a26d8dd2bc4d22c2be8045b5d956d86282f39
2021-05-22 11:00:03 +00:00
drh
d42dbd9dfe
If an FTS5 Cursor fails to enlarge the space for the aInst array, set the
...
size of the aInst array to zero.
dbsqlfuzz 294254b8105cca409f27a711f1eb2e9e63cbcac5.
FossilOrigin-Name: 4ae5e5b5ecbce580d3f7f970076e828fc6fb5fbcdc3bbe8381ab38f52870a54f
2021-05-22 01:30:30 +00:00
drh
e31cba5675
Remove an assert() in FTS5 that can (rarely) be false in the event of an
...
OOM while processing a corrupt database file.
FossilOrigin-Name: 5f12f89154843e83b1d69ea1652e881d583aa329df732af72dd59029cd7eb577
2021-05-06 13:45:37 +00:00
dan
a4cd0bbcb3
Fix a segfault that could occur when querying a corrupt data structures with an fts5token table.
...
FossilOrigin-Name: cbedfa05501f3eb9750fb21e2ab8516f8f14c479c847f454e52572af278aab71
2021-04-27 11:28:57 +00:00
dan
f3d5a68461
Fix an assert() in fts5_index.c that may fail if the database records are corrupt.
...
FossilOrigin-Name: dfadb96edfef1d49e48a659264b9eb8d7f98d95d159d95c92c30dd4ba6c6e739
2021-04-23 11:37:01 +00:00
drh
214b50314a
Fix harmless compiler warnings of unused function parameters in FTS5.
...
FossilOrigin-Name: 14273915979f8fbf80111e795b5511a6ee24638896b9d434d6ccf4bf7f7a7f62
2021-04-22 19:34:31 +00:00
dan
6a4f7f0225
Remove fts5 test functions fts5_expr(), fts5_expr_tcl(), fts5_isalnum() and fts5_fold() from release builds.
...
FossilOrigin-Name: c68a6c6c898d2acd1f7032ff98f8f3f99eb0b37ffbc6ee88d0dd7badf55a0e0a
2021-04-19 16:45:09 +00:00
dan
304cbc17c2
Fix an undefined signed integer overflow in fts5.
...
FossilOrigin-Name: e6f0adb00da84561e686a8db83858c7fd6b008756dd1aef807ea68f878ca3db7
2021-04-13 17:45:36 +00:00
drh
f1f12661c3
Avoid taking the address of a NULL pointer following an OOM in FTS5. Doing
...
so is harmless in actual practice, but it technically UB so we want to
avoid it.
FossilOrigin-Name: 1cfcd9dceb56b5987e6900a36a0ec092f0e1b13a7e754b8c3d8efb943e5bcc66
2021-04-12 18:32:33 +00:00
dan
d73ade7d87
Fix issue with failing --enable-debug --enable-fts5 build.
...
FossilOrigin-Name: e7491acc0c93b7b0b5a27130d956bb23f876b90ced11cdd416a86727af076ee1
2021-04-06 17:51:18 +00:00
dan
f22c590bab
Remove some test routines from release builds of fts5.
...
FossilOrigin-Name: 3088bf15ca53fac3bad94f241e648836631b6d801d42837c238ff27d85074ca4
2021-04-06 14:46:50 +00:00
dan
acbae3ba10
Add "#ifdef SQLITE_DEBUG" blocks around test variables sqlite3_fts5_may_be_corrupt and sqlite3_fts3_may_be_corrupt.
...
FossilOrigin-Name: 004559544e661f9afa60306c4ac6842c29a8630b3663d62aa0cdc637f176932e
2021-03-29 20:04:31 +00:00
drh
8210233c7b
Revise tests cases to align with the new EXPLAIN QUERY PLAN output.
...
FossilOrigin-Name: 50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
2021-03-20 15:11:29 +00:00
dan
55b2e8b062
Fix further sanitizer complaints in the fts5 code.
...
FossilOrigin-Name: 4cb00b9d4020a51f690720c6f51009c5be8c22ef8c70807ead1d953d19784f26
2021-03-10 19:32:47 +00:00
dan
3be2b860d0
Fix a few sanitizer complaints in fts5.
...
FossilOrigin-Name: 4fe4fee00e9294fa384bd073ed8e9a2a4ad10dcf653b6ad4851e44a64443ede9
2021-03-10 14:57:10 +00:00
dan
8718f0b613
Fix a buffer overrun that could occur in fts5 when running a prefix query against a corrupt db.
...
FossilOrigin-Name: 4da40620ac8557aba6e1e06e720418b55e9950f406288b03749ef1b117041cd9
2021-03-03 19:36:40 +00:00