]> git.ipfire.org Git - thirdparty/sqlite.git/commit
In sqlite3.wasm.allocFromTypedArray(), swap the order of the allocation and the acces...
authorstephan <stephan@noemail.net>
Sun, 9 Nov 2025 06:32:10 +0000 (06:32 +0000)
committerstephan <stephan@noemail.net>
Sun, 9 Nov 2025 06:32:10 +0000 (06:32 +0000)
commitc55d8262cf45391192712b3a91632d7906b9cb52
tree82c04c1500981351e74749c709db585b7281448d
parent66b37e991bb3337c79eb05591d6688596caa2ea6
In sqlite3.wasm.allocFromTypedArray(), swap the order of the allocation and the access to the heap view object to work around an obscure issue when allocating huge blobs. The heap view object could previously become stale via the following allocation if the underlying WebAssembly.Memory object needed to grow. Essentially a realloc()-moves-the-pointer situation but it only comes up with huge allocations under the right circumstances and would trigger a JS exception (as opposed to corrupting the WASM heap). Problem reported in [forum:05b77273be104532|forum post 05b77273be104532].

FossilOrigin-Name: 0f712b6b0516dc151d3bcbb63497661c82e11eae368e639bbdf197e1b3467195
ext/wasm/api/sqlite3-api-prologue.js
manifest
manifest.uuid