Skip to content
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

fuzz: Test more parser entry points #538

Merged
merged 2 commits into from
Mar 30, 2024
Merged

fuzz: Test more parser entry points #538

merged 2 commits into from
Mar 30, 2024

Conversation

nwellnhof
Copy link
Contributor

Use the upper bits of 'options' to select a parser mode from

  • cmark_parse_document
  • cmark_parse_file
  • cmark_parser_new/feed/finish
  • cmark_markdown_to_html

@jgm
Copy link
Member

jgm commented Mar 25, 2024

CIFuzz is failing after this. Do you want me to merge it anyway?

Use the upper bits of 'options' to select a parser mode from

- cmark_parse_document
- cmark_parse_file
- cmark_parser_new/feed/finish
- cmark_markdown_to_html
@nwellnhof
Copy link
Contributor Author

It turned out that the libFuzzer Makefile target didn't enable ASan. I force pushed some fixes.

posix (macos, clang, shared) now failed because of a timeout. This seems unrelated.

-DCMAKE_BUILD_TYPE=Asan doesn't seem to work. Pass sanitizer flags
manually.
@nwellnhof
Copy link
Contributor Author

I force-pushed again and all tests are green.

@jgm jgm merged commit 5006438 into commonmark:master Mar 30, 2024
15 checks passed
@nwellnhof
Copy link
Contributor Author

OSS-Fuzz coverage is now at 96%: https://storage.googleapis.com/oss-fuzz-coverage/cmark/reports/20240402/linux/src/cmark/src/report.html

My plan is to add a fuzzer for the uncovered tree API functions similar to work I recently completed on libxml2: https://gitlab.gnome.org/GNOME/libxml2/-/blob/master/fuzz/api.c?ref_type=heads. But this might take a while.

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