aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tester1.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-02-03 17:34:12 +0000
committerstephan <stephan@noemail.net>2025-02-03 17:34:12 +0000
commit3cd34ab981ebed34bce66c19bb9144e40c6e9204 (patch)
treec7c0f2bfee04c9e5a71a37279624a28342d1c4c3 /ext/wasm/tester1.c-pp.js
parentd98689f4d39c4729ef95a93317eaa7892a6aaed6 (diff)
downloadsqlite-3cd34ab981ebed34bce66c19bb9144e40c6e9204.tar.gz
sqlite-3cd34ab981ebed34bce66c19bb9144e40c6e9204.zip
Rework [76c8435a] to eliminate automatic JS-to-WASM function conversions of sqlite3_set_auxdata() destructors because it can leads to leaks on every call of a UDF. This feature never worked before [76c8435a] but fixing it was ill-conceived because of the memory leakage it introduces. WASM function pointers can still be used as destructors in this context.
FossilOrigin-Name: 3fb993af0caf041da934cea29c039b27c468be0b75bce1537a6425767cf9bf8d
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r--ext/wasm/tester1.c-pp.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js
index 880edcec1..9038d6832 100644
--- a/ext/wasm/tester1.c-pp.js
+++ b/ext/wasm/tester1.c-pp.js
@@ -3469,9 +3469,9 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
We do not currently an automated way to clean up
auxdata finalizer functions (the 4th argument to
sqlite3_set_auxdata()) which get automatically
- converted from JS to WASM. Because of that, relying
- on automated conversions for those is not
- recommended. Instead, follow the pattern show in
+ converted from JS to WASM. Because of that, enabling
+ automated conversions here would lead to leaks more
+ often than not. Instead, follow the pattern show in
this function: use wasm.installFunction() to create
the function, then pass the resulting function
pointer this function, and cleanup (at some point)