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

Speed optimizations for: 39170: jsoup:XmlFuzzer: Timeout in XmlFuzzer #1646

Closed
jhy opened this issue Sep 27, 2021 · 1 comment
Closed

Speed optimizations for: 39170: jsoup:XmlFuzzer: Timeout in XmlFuzzer #1646

jhy opened this issue Sep 27, 2021 · 1 comment
Assignees
Labels
fuzz An issue found by the OSS Fuzz project improvement
Milestone

Comments

@jhy
Copy link
Owner

jhy commented Sep 27, 2021

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39170

These are mostly in the HTML Parser (via the XML Decl parsing - good to fix sometime but doesn't really come up outside of the fuzzer).

@jhy jhy added improvement fuzz An issue found by the OSS Fuzz project labels Sep 27, 2021
@jhy jhy added this to the 1.14.3 milestone Sep 27, 2021
@jhy jhy self-assigned this Sep 27, 2021
@jhy
Copy link
Owner Author

jhy commented Sep 27, 2021

Initially: 0.48 seconds per iter

With the following changes, improves to 0.19 per iter and so within our bounds:

Change Note
4b46397 Short circuit scans for custom elements
d3f4e31 Flyweight (memoize) the Tag.valueOf(custom) per document scan, so reduces GC
a8df71b Limit stack depth scanning for DD/DT tags (was unbounded)
e4ae6fa Only need to foster if the current stack element is a table type

@jhy jhy closed this as completed in b14eb2a Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzz An issue found by the OSS Fuzz project improvement
Projects
None yet
Development

No branches or pull requests

1 participant