Skip to content

Let's fuzz CommonMark and XML output with mama.#663

Merged
kivikakk merged 2 commits intomainfrom
push-yxwvqqxyvtpl
Oct 29, 2025
Merged

Let's fuzz CommonMark and XML output with mama.#663
kivikakk merged 2 commits intomainfrom
push-yxwvqqxyvtpl

Conversation

@kivikakk
Copy link
Copy Markdown
Owner

This is proving fruitful, after noticing these come up when running the quadratic fuzzer.

First fix: don't use an i32 bitset (!!) to track the longest backtick run in inline code spans when formatting as CommonMark, as (unsurprisingly) it limits us to 31 backticks in such a span before panicking.

@kivikakk kivikakk enabled auto-merge October 29, 2025 00:39
@kivikakk kivikakk merged commit ed13210 into main Oct 29, 2025
45 checks passed
@kivikakk kivikakk deleted the push-yxwvqqxyvtpl branch October 29, 2025 00:40
@github-actions
Copy link
Copy Markdown
Contributor

Command Mean [ms] Min [ms] Max [ms] Relative
./bench.sh ./comrak-59658ba 105.8 ± 1.1 104.5 108.6 1.81 ± 0.03
./bench.sh ./comrak-main 106.5 ± 0.9 105.1 108.3 1.82 ± 0.03
./bench.sh ./pulldown-cmark 58.5 ± 0.8 57.2 60.8 1.00
./bench.sh ./cmark-gfm 94.5 ± 6.8 82.7 106.0 1.61 ± 0.12
./bench.sh ./markdown-it 263.6 ± 2.2 258.8 267.3 4.50 ± 0.07

Run on Wed Oct 29 00:42:37 UTC 2025

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.

1 participant