-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Internal panic with nested links #50
Comments
Thanks @squili!
Line 1275 in c139008
Is this something you'd be interested in digging into more and exploring a fix for @squili?
Ideas on how to improve the fuzzer are welcome! |
I think the proper behavior here would be to return an error instead of panicking. Maybe some On fuzzing, I think it might be good to have an automatic generator for random strings instead of coverage-based. While coverage-based is great for efficiency, the detected cases you linked are pretty short and the markdown parser itself is super fast, so a bunch of random ordering of tokens would probably pick some more issues up. |
I'm not sure an error would make sense here.
Efficiency would be key here. Yes, unguided fuzzing can theoretically more panics given time and compute, but it uses A LOT of time and compute to do so. Do you have a suggestion of where to find that level of time and compute? Or do you have another idea which works with commodity compute and bounded time? |
Enter event for LabelText should be inserted before existing events at the index in order to have correct nesting. Otherwise nested elements could have Enter event first and that would result in incorrect nesting in the tree when converting to AST. Fixes wooorm#50
Fixed, thanks to @sheremetyev! |
The strings
[![]()]()
![![]()]()
cause panics when passed to
to_mdast
!I'm surprised this didn't get detected by fuzzing - you might want to double check the fuzzer
The text was updated successfully, but these errors were encountered: