Skip to content

Conversation

@Liamolucko
Copy link
Contributor

  • The parser would panic on empty block comments (/**/), since it would interpret the /** as the start of a doc comment, leaving the block comment with / instead of */ at the end and tripping an assertion.
  • The parser would panic on .md files, since it assumed they were .wit.md files and tried to strip the nonexistent .wit from the filename. I worked around this by changing the parser to take everything before the first . as the name of the interface.

I found these while trying out cargo-fuzz.

- The parser would previously panic on empty doc comments (`/**/`), since it would interpret the `/**` as the start of a doc comment, leaving the block comment with `/` instead of `*/` at the end and tripping an assertion.
- The parser would panic on `.md` files, since it assumed they were `.wit.md` files and tried to strip the nonexistent `.wit`.
- The parser would panic if the input path did not end in a file.

I found these while trying out `cargo fuzz`.
@alexcrichton alexcrichton merged commit 0e30d8c into bytecodealliance:main Jul 19, 2022
@alexcrichton
Copy link
Member

Nice!

@Liamolucko Liamolucko deleted the parser-bugs branch July 20, 2022 05:21
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