Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add lifetime to matches function #3254

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

WillLillis
Copy link
Contributor

This fixes an issue where a QueryCursor can be dropped but still have .matches() called on it, leading to an attempt to index into a zero-length array in the C library. My comment in the issue reporting the bug has a more in-depth explanation.

Closes #3253

@WillLillis WillLillis changed the title fix: Add lifetime to mactches function fix: Add lifetime to matches function Apr 4, 2024
@maxbrunsfeld maxbrunsfeld merged commit 9ae61fe into tree-sitter:master Apr 4, 2024
12 checks passed
@maxbrunsfeld
Copy link
Contributor

Thanks!

@WillLillis WillLillis deleted the bug_fix branch April 4, 2024 02:54
@amaanq
Copy link
Member

amaanq commented Apr 4, 2024

nice debugging @WillLillis!

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.

Assertion failed when using QueryCursor::matches
3 participants