1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00
Commit Graph

5345 Commits

Author SHA1 Message Date
stephan
6eaeea0a3b Fix an off-by-one in c-pp-lite.c which could cause @token@-processed output to get one duplicated byte.
FossilOrigin-Name: aa2f4c51604f4d4286c8a1ec7eaa6251892471e32087af695712513ee620ea46
2025-10-16 01:44:03 +00:00
stephan
e826aa8e00 Minor JS doc updates. No code changes.
FossilOrigin-Name: fc2a026901b1a12526b92fff36d7acc226e554c9f351e6261c7ffd4887bcc337
2025-10-15 23:28:31 +00:00
stephan
ff5d4c348c Resolve a valgrind-reported error in ext/wasm/c-pp-lite.c caused by successful exit colliding with the atexit() handler. Add -e SCRIPT support to c-pp-lite to facilitate testing.
FossilOrigin-Name: 7801c7225a18ccb2216b01663b30e3eb90a961e3d165af73f964c515b74fe745
2025-10-15 23:13:50 +00:00
stephan
d6cb2ccee6 JS/WASM: Expose sqlite3_db_status64(), sqlite3changeset_apply_v3(), sqlite3changeset_apply_v3_strm(), and SQLITE_DBSTATUS_TEMPBUF_SPILL.
FossilOrigin-Name: b13eafc9b6820517b450041a7e2be573a896b5b9e88b2b28df9f15e3cb91e23d
2025-10-14 18:23:32 +00:00
stephan
4472c967a6 Fix two links in ext/wasm/README.md.
FossilOrigin-Name: 0f96eaeaa8c51c20f8d389bfd6d0d6371e8bb29ff7e8eaf3a0bcb35cb2b73338
2025-10-14 14:07:58 +00:00
drh
abe709be8d Extra defenses against integer overflow in the decimal extension.
FossilOrigin-Name: 1a7414d9b5be7ce18b23c357fd98cd0e96d78ac626abfa6e4e0dee494b6a1efc
2025-10-14 14:03:09 +00:00
stephan
5dbbe50758 Add a section to ext/wasm/README.md about the dependency on wabt/wasm-strip for release builds.
FossilOrigin-Name: 0dbb13863b3ff1da1be664967ac05c79cf34f7a78def05fe4f6407c06cb4322a
2025-10-14 13:47:40 +00:00
stephan
9f136fc5ed Fix a makefile typo which caused a build directory to not get mkdir'd for the fiddle build.
FossilOrigin-Name: d98d5abf6d27c5359ff8c797ad57394b96074e47010bc4c24120ba69a967dc3c
2025-10-14 13:25:02 +00:00
dan
264bcad69a Avoid integer overflows (a) when dealing with zeroblob(N) calls when 2*N is larger than 2^31, and (b) in fts5 when a corrupt record is close to 2^31 bytes in size. Both of these require special builds with SQLITE_MAX_LENGTH set to a non-default value.
FossilOrigin-Name: 27927519696dcb78ff72e245158ea6d33a1b2c3d4da314d4d0283c47d847c3da
2025-10-13 16:07:28 +00:00
drh
e4eaf174a5 Remove an unused variable from the generate_series implementation.
FossilOrigin-Name: a523e4adbf8e60ea8c3351f33aff793c6e425c594038e8578d12564bf47aac03
2025-10-11 18:44:54 +00:00
drh
11878165f6 Improvements to the (rarely used) home-grown varients of seriesCeil()
and seriesFloor() based on ideas from
[forum:/forumpost/2025-10-11T12:36:56z|forum post 2025-10-11T12:36:56z].

FossilOrigin-Name: e6b9bfdb6f8f86d4d2891d65fee4274dcbc61c9e998d81f90232153c05788cab
2025-10-11 15:45:47 +00:00
drh
5013fd1f81 Provide alternative implementations of ceil() and floor() to the
generate_series() function so that it will build even when SQLite is
compiled using --disable-math.
[forum:/forumpost/91690fa646|Forum post 91690fa646].

FossilOrigin-Name: 97d6fd2c99578adb6a1e9b879ba5ae5ad798a8ef8f0646bf0102747d52148bff
2025-10-10 19:43:03 +00:00
dan
eeb2e03b7b Back out [8bf26c956e]. It is not required following [8e7da8cf50].
FossilOrigin-Name: ea29180797aa4bb25180432e75a372277a6f6e2262906a9e765a3bddf8ca79d7
2025-10-10 16:04:19 +00:00
drh
80f0fcd31d Fix harmless compiler warnings.
FossilOrigin-Name: 4966d7a1ce42af8b1c50fdd40e651e80d0eeb8cb62dd882950cab275f98aba88
2025-10-10 14:31:46 +00:00
stephan
b4fdfc2f9a Update c-pp.c and rename it to c-pp-lite.c to match its new upstream name. Adapt the JS files and mkwasmbuilds.c for c-pp syntactic changes.
FossilOrigin-Name: bb13e46ddfcd1d3ca73845430d9a91c0ea3913762d39bbd94127783d77e4f63b
2025-10-09 15:28:59 +00:00
dan
40d299ae32 Avoid corrupting the fts5 index if a value that was inserted via sqlite3_bind_blob() in a non-utf8 db is deleted.
FossilOrigin-Name: 8bf26c956e199762d55c159392c2e3813a9e12b914d3ca33000bf332cd946cb0
2025-10-09 14:50:27 +00:00
stephan
0df9db4921 Make use of the new SQLITE_ENABLE_PERCENTILE in the wasm build.
FossilOrigin-Name: 937c084c2d9b20fde2d54e48257cb7018bd8c36d6f00ed6f1659b5ecc2f48ed4
2025-10-08 18:17:19 +00:00
drh
cdaff852bf Were we to choose to integrate the carray() table-valued function into the
amalgamation, that integration might look something like this.

FossilOrigin-Name: 2b43d5d7dcc5aee14a050c824a5e09b6a38a9c78ddcc25a994eba5d4c5ad9ba2
2025-10-08 15:32:55 +00:00
dan
6147a0f6a1 Add test cases for the carray module.
FossilOrigin-Name: dcfc0164a95eddb5e924c606850fe2015e8f2f516d36b380cbb79d6bdfe034fc
2025-10-07 21:02:37 +00:00
dan
9b6bc61dbd Fix some integer overflow warnings in the base64 and base85 extensions.
FossilOrigin-Name: 06b4bd2aba22c57f5a5fed606c3bee225dee6fdc13bb16cc58194040ef0d7d85
2025-10-07 15:14:03 +00:00
dan
9804ed7021 Avoid attempting to delete a file that is still open in sessionnoop2.test.
FossilOrigin-Name: 56f6d6c538fd4e0da8a7c4e4c4d1bd0b8cd83ffd126ae24daaf30fdf808e1a78
2025-10-06 17:52:52 +00:00
drh
1d574d3d71 Remove the memvfs.c extension, to prevent it from being misused.
See [forum:/forumpost/91811439aa|forum post 91811439aa] for the complaint
that prompted me to take down this demonstration code.  I have other things
to do rather than argue about posts such as the foregoing, so it is easier
to just take the code down.  If you need this code, you can downloading older
check-ins.  The beauty of DAG-based version control systems like Fossil
(and Git) is that nothing is ever lost; it is just stops appearing on
trunk.

FossilOrigin-Name: eb79110dcac80dde3bcca0929d67a8f8f6d2eea5695184b2b7c6788283f06902
2025-10-02 22:48:08 +00:00
drh
e2ebc364cd Fix typo in the previous check-in. Remove surplus end-of-line whitespace
from the ext/misc/fossildelta.c extension.

FossilOrigin-Name: cc87551805dc1fcb05598339e526b304401b64a4eaaa2148a9d837b1423484ce
2025-10-02 19:35:58 +00:00
drh
0d9ec8b2ee Harden the debugging vtab "delta_parse()" which is part of the
ext/misc/fossildelta.c extension against malicious inputs.
[forum:/forumpost/be139437c3|forum post be139437c3].

FossilOrigin-Name: 4be6deee646f2c0f591ba81f902182ca9302050a7fb2729c7f64981307058b8b
2025-10-02 19:19:40 +00:00
dan
cbc3cd47f0 Fix a buffer overrun in the zipfile extension that could occur while processing zip archives with extremely long file-names and comment fields.
FossilOrigin-Name: c284fda848038a61972fd1df5796f608a24ead109170aafe562a5d5787c46488
2025-10-02 11:16:22 +00:00
drh
65ee59bb26 Prevent embedded 0x00 characters in the output strings from confusing
the completion extension and causing it to read past the end of an array.
[forum:/forumpost/88a08b3201|Forum post 88a08b3201].

FossilOrigin-Name: 26f6d41f9d3ab656129af333d54a8645c6890314919bcae90351ba0c2240ceef
2025-10-01 19:01:19 +00:00
dan
a9af4102f1 Fix a buffer overread in demo code in ext/misc/memvfs.c.
FossilOrigin-Name: 90f7318308ca8372cbd9f183d88ff6cb884446f6df0695294c9a9955c5109f72
2025-10-01 14:28:48 +00:00
drh
0f76b0a4d6 Fix various compiler warnings.
FossilOrigin-Name: 24ee6c25b4745c8fd671d845b48b9ab98a787ccb348d560ad70f19d035e7990e
2025-09-30 17:37:18 +00:00
drh
c8e6f627b8 Fix the new generate_series() to correctly deal with an explicit 0 as the step.
FossilOrigin-Name: b059413c440d1b831c9a462f7165a350001ba7a8cc77ca2a0a8f2bb73c830aba
2025-09-30 17:12:39 +00:00
dan
d05bf5aedf Fix another potential buffer overread in the zipfile extension.
FossilOrigin-Name: 0819fe670f9ceec79f84eb09c234dc29f6581332f86a53d6a0547697404efff1
2025-09-30 11:17:40 +00:00
drh
5b15123fba Strengthen the fts5_locale() function against integer overflow attacks,
even when SQLite is compiled with oversize values for
SQLITE_MAX_LENGTH.

FossilOrigin-Name: f0dbd9d22f558dd002e2132381de3c82d55a670399b3e527b5962b025141676a
2025-09-30 10:11:44 +00:00
dan
3eccaa7915 Fix a buffer overread in the zipfile extension code.
FossilOrigin-Name: 70c2c99b6f12a3467c23b44adcaf2d7d780ba8317b72de2f6730b1d892cf0c85
2025-09-29 18:55:05 +00:00
drh
36ba76010c Revamp the implementation of generate_series to simplify and improve
long-term maintainability.

FossilOrigin-Name: 9041ca8543ff3d2a617ce4df696aa53269a7803716caaf55a8e61e59ee667040
2025-09-28 18:25:59 +00:00
stephan
436c8e5026 Remove the long-defunct wasmfs build of speedtest1 from index.html and re-enable the wasmfs scratchpad app (which still works). Fix the CFLAGS for the wasmfs build and the path to the wasm file for one of the JS.
FossilOrigin-Name: acaaf8cce9e780bf937436b4c987ed284aa0bba6f5ca9508d9dbad598af2991d
2025-09-28 18:03:29 +00:00
drh
1bf80f2dce Minor bug fixes. Many new test cases.
FossilOrigin-Name: 86dcc68d1816d970d8d5fb158696c3fe6c5ddcac2c255823110d656372503885
2025-09-28 17:24:42 +00:00
stephan
39bffbcd32 Use new c-pp features to simplify generation of the tester1 family of files.
FossilOrigin-Name: f7cab028c97b2c9ac9b561a4c33475aadd3f71cbd48ec4dd6e09c1bb19ec00cb
2025-09-28 12:47:09 +00:00
drh
d3cd2a25b4 All legacy tests are passing. Want to add new test cases before merging.
FossilOrigin-Name: adb80761d2319e16b6db2b5e35fedc239fad0ed5d26d629a5ea659c90881f76a
2025-09-28 11:01:05 +00:00
drh
9ffb344ed9 The generate_series rewrite is working better now, but is still not
completely correct.

FossilOrigin-Name: 6c41d14707e6890ca6d0460c72178ccb710d7f41dead76f222f1382c5cbd5a9a
2025-09-28 10:36:23 +00:00
drh
5b047a8ec6 Refactor the generate_series extension. Compiles but does not yet work.
FossilOrigin-Name: 25e395a82f14513bf23c1e913fe24be77ad74fec1540f524e709f9cdfeb3dc56
2025-09-28 09:25:07 +00:00
stephan
1d592e0d62 Internal js/wasm tooling doc updates.
FossilOrigin-Name: 0d6ed44278a513b062539f32da49fa43952fcdf0bc1bba7b24ef3749bc4525a5
2025-09-28 02:30:25 +00:00
stephan
0b0c8734f3 Improve #if support in, and add #assert to, c-pp. Rename target=... preprocessor symbols to target:... because changes in the semantics for symbols which have an '=' makes some of those #if blocks mutually exclusive (which we won't want in rare cases involving the bundler-friendly builds).
FossilOrigin-Name: 54287487793d48f6dde919446ab7476aea0cc0aba3835c80f060a7b84221881a
2025-09-28 00:53:00 +00:00
drh
54f296389c Rework the bounds calculations on generate_series() in an attempt to
avoid signed integer overflow when the bounds are ridiculous values.

FossilOrigin-Name: 3d9148c7d7379a34a0c2a33a1eb2562234868bc0b14c3d16990b33e52fd4ebc5
2025-09-27 15:03:11 +00:00
stephan
41549103ac ext/wasm/c-pp.c: add #savepoint support. Consolidate how the diverse sqlite3_stmt handles are managed.
FossilOrigin-Name: b44650f907e9cb4ec908bb7525488e309946fac9d84cdac4cdde730527a440a9
2025-09-27 13:34:02 +00:00
drh
15e4074084 Additional cleanup and refinement of the regexp.c extension.
FossilOrigin-Name: 2b34b750b5528b6dda195bc1a3895dc3fe46e70cbf992a78111316e2726c1ade
2025-09-27 11:54:49 +00:00
stephan
4ac2118c5d Teach c-pp how to replace configure-script-like @tokens@, giving us a much simpler way to get the proper WASM file name injected into each JS build.
FossilOrigin-Name: ffd5c8eaa89250a043b573c3eb66693dfec087a5b5eef184ae6d7bfbcf61235a
2025-09-27 11:38:35 +00:00
stephan
4bdfae9d40 Remove and edit some comments.
FossilOrigin-Name: 1fa7e32d264f8329a8c9b0b5b469f1fc7ccadee86696d65e05df7fa3868af158
2025-09-27 00:07:25 +00:00
stephan
5d0d30ae2d Add wasm.ptr to the module-symbols.html output.
FossilOrigin-Name: dced5a7c434b83553ede533f71e3133450795c12fc67acd1a55fdedfa8fed76c
2025-09-27 00:05:13 +00:00
stephan
836e895f9e Latest upstream c-pp.c for the ability to process multiple inputs and outputs in a single invocation.
FossilOrigin-Name: c7633373046ceb94f293b8fbd4f436a1eb281c2744d97334c6e7e3a803d8eac2
2025-09-27 00:04:28 +00:00
stephan
879066a0a2 Delay replacing the wasm file name strings until they're needed. Add target b-all to run all known wasm builds.
FossilOrigin-Name: a4edaecc9b0b649df53a99e05d9abfbc5bdb40d45c7c6940a50b24fa30dca158
2025-09-26 19:41:07 +00:00
stephan
e309de27f9 Consolidate some duplicate code in mkwasmbuilds.c.
FossilOrigin-Name: 1078aa4f1e5685d45e31eea622865ddd077f367f1cec90fc267e8ba50cbe2ee9
2025-09-26 19:30:34 +00:00