mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
sqlite: prevent reentrant session.close()
Reject session.close() while generating a changeset or patchset. Closing the session at that point frees it while SQLite is still using it, causing a use-after-free. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: https://github.com/nodejs/node/pull/65349 Fixes: https://github.com/nodejs/node/issues/65347 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This commit is contained in:
1 parent
810929b6dd
commit
e2f952f2ff
4 files changed
+31
-1
No files matched your search
+2
-1
@@ -1005,7 +1005,8 @@ wrapper around [`sqlite3session_patchset()`][].
|
||||
|
||||
### `session.close()`
|
||||
|
||||
Closes the session. An exception is thrown if the database or the session is not open. This method is a
|
||||
Closes the session. An exception is thrown if the database or the session is not open,
|
||||
or if the session is currently generating a changeset or patchset. This method is a
|
||||
wrapper around [`sqlite3session_delete()`][].
|
||||
|
||||
### `session[Symbol.dispose]()`
|
||||
|
||||
Reference in new issue
Block a user