Skip to content

Fixes crash, take 2 #164

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

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Fixes crash, take 2 #164

merged 1 commit into from
Jan 18, 2023

Conversation

eed3si9n
Copy link
Collaborator

@eed3si9n eed3si9n commented Jan 17, 2023

Fixes #159

Problem

tree-sitter-scala crashes under mysterious conditions. gdb seems to indicate that it happens around get_column.

Solution

Avoid calling get_column when it's at the end of file. That seems to satisfy fuzz.

Problem
-------
tree-sitter-scala crashes under mysterious conditions.
gdb seems to indicate that it happens around `get_column`.

Solution
--------
Avoid calling `get_column` when it's at the end of file.
That seems to satisfy fuzz.
@theHamsta
Copy link

This get_column at eof hit caused many of the segfaults we saw before in parsers

Copy link
Collaborator

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

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

Nice find! Great to see the fuzzer working as well.

LGTM!

@ckipp01 ckipp01 merged commit 64aaf09 into tree-sitter:master Jan 18, 2023
@gvolpe
Copy link

gvolpe commented Jan 18, 2023

Can confirm this actually fixes the issue, thanks again @eed3si9n ! 😍

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.

Crash
4 participants