-
Notifications
You must be signed in to change notification settings - Fork 29
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
SEGFAULTs and assertion failures #14
Comments
Another run:
|
Indentation support has landed! The definitions for Python don't exist yet, but I'm still getting rid of the separate Python indentation plugin to remind myself that I should check. Also, since I'm using Black for auto-formatting, the ugly default indentation is less of an issue now. The Treesitter playground is a really nice way to visualize the parsed tree for a given buffer. It will teach me about parsing and help if I ever need to create my own Treesitter queries. Basic Markdown support is finally available, but I should probably still wait for languagetree to settle down. Also, the Markdown parser currently seems to be responsible for a crash: - nvim-treesitter/nvim-treesitter#602. - ikatyang/tree-sitter-markdown#14 So not getting rid of the Markdown syntax plugin just yet, and disabling the markdown parser for now. And last but not least, using the new ensure_installed option to install the parsers.
Adding my two cents to this, using AFL I ended up with the following [](0 () |
Found an even smaller repro file for the assertion error @theHamsta : 0
-:
*0
0 |
Hi, sorry for the late response, I've managed to fix all the failed cases provided in this issue, the PR (#17) is still WIP since there are still some errors that could be found by the libfuzzer and I'll merge the PR once I cannot find any further error. |
Still not fixed, here are two more inputs that cause a crash : faults.tar.gz |
Some potential mitigations: nvim-treesitter/nvim-treesitter#872 (comment) |
@vigoux could you share how you setup afl? what would I need to run? |
The mitigation (#29) has been released. And the crashed cases mentioned by @vigoux has been moved to #30, since the previously-crashed cases are now crash-free with the cost of the parsed tree being not accurate, but the parsed tree should be accurate again once the typing finished if the assumption of the crash caused by unfinished typing is correct. Let me know if there's any issue, thanks and sorry for the inconvenience. |
We at nvim-treesitter are using this parser for editor support in Neovim. We've received and experienced reports about segfaults of this parser nvim-treesitter/nvim-treesitter#602 neovim/neovim#13122. We would love to use this project, however we can't when it's killing the whole editor.
https://files.gitter.im/5506b96e15522ed4b3dd5317/KR5c/after.gif (referencing scanner 253)
Maybe a way to debug this would be to use tree-sitters libfuzzer feature.
python
used in script must be python2 (or edit./script/build-fuzzers
by replacingpython
withpython2
)Below you can see a example output achieved by this fuzzer.
the test input (I can also send you the file). Probably it's easier to read from above report (
*\x01\x03$$\x0a-:\x0a<<<*\x01\x03$$\x0a-:\x0a<<<+-+-
)The text was updated successfully, but these errors were encountered: