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 a crash in the external scanner, convert scanner to use array.h header #91

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

maxbrunsfeld
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld commented Mar 18, 2024

This fixes an error where deserialize could accidentally write uninitialized custom_tag_name values into the scanner's state, which caused a crash in the destroy hook.

While we were here, we also got rid of the custom String and Vec types, and switched to using array.h.

@maxbrunsfeld
Copy link
Contributor Author

Hey @amaanq , sorry I didn't see you had a PR open to use array.h before we went ahead and made the switch. I'd like to proceed with this version, since we made a couple of other improvements, like passing ownership of scanned strings into the Tag, rather than cloning the old string and freeing the old string.

@amaanq
Copy link
Member

amaanq commented Mar 18, 2024

hey that's totally fine, I think mine was outdated anyways (missing a few minor changes upstream) so this is good

@amaanq amaanq merged commit de93795 into master Mar 18, 2024
6 checks passed
@amaanq
Copy link
Member

amaanq commented Mar 18, 2024

PS, can I bother you to take a peek at tree-sitter/tree-sitter#3191? It has some really important fixes I'd like you to check out

@maxbrunsfeld
Copy link
Contributor Author

Yes, I'll take a look at that this week. Thanks!!

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.

2 participants