Repository navigation
🧪 test(fuzz): cap the html5lib nesting oracle - #1627
Merged
Merged
Conversation
html5lib scans its open-element stack on every insertion, so encoding_observation timed out on parse_deep_nesting.html while turbohtml parsed it in 3 ms. Skip the comparison past 2500 open tags, where html5lib takes about 100 ms.
gaborbernat
enabled auto-merge (squash)
November 5, 2026 00:33
Merging this PR will not alter performance
Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fuzz_encoding_bytestimed out onparse_deep_nesting.html. The html5lib oracle is quadratic in nesting depth (about 100 ms at 2500 nested divs), while turbohtml parses the input in 3 ms. The comparison is now skipped past 2500 open start tags.Fuzz harness only, so the PR carries
skip news.