-
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
fix oom #39
base: master
Are you sure you want to change the base?
fix oom #39
Conversation
@ikatyang I see that this project has been quiet for a few months. Is it still alive? With my fixes / workarounds here and at #36, the parser is currently holding strong against the fuzzer. (It has only been an hour, so too soon to declare victory - but that's definite progress!) If that continues to be the case, I imagine that eg neovim might want to revive their interest in using this. So it would be good to get a sign as to whether this is a going concern or not. |
I do a lot of markdown editing and would love to be able to have syntax highlighting!! |
I stopped after a few hours. Certainly that's too soon to promise that there's nothing left to find: but it's considerably longer than the fuzzer has previously taken to find issues. |
it looks like the project maintainer @ikatyang isn't active anymore. Maybe we can fork and include prs? |
|
the finel todays github imjiniaring world war ll |
This addresses - but does not exactly fix - the out-of-memory reported in #32.
I have removed a block of code which, I suppose, is somehow mis-handling this case. This isn't a clean fix, we now go on to hit the assertion that follows: but with
TREE_SITTER_MARKDOWN_AVOID_CRASH
we catch this error and seem to recover.The input:
now parses as:
I was expecting an error! But this doesn't look stupid, and certainly is a lot better than looping and consuming all available RAM.