Skip to content

Conversation

@littledivy
Copy link
Member

@littledivy littledivy commented Jan 5, 2026

Keep a reference of StatementSync alive to prevent GC from destroying statement handle while iterator is being used.

Fixes #31744

Prevents StatementSync to destroy statement handle while iterator is
being used.
@littledivy littledivy changed the title fix(ext/node): reference StatementSync in JS iterator fix(ext/node): fix use-after-free in StatementSync JS iterator Jan 5, 2026
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we test this?

@johnspurlock
Copy link
Contributor

simple repro case here if that helps

#31744 (comment)

@littledivy littledivy merged commit 8d47d7e into denoland:main Jan 8, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node:sqlite Segmentation fault: 11 after iterating around 130,000 rows

3 participants