serenity
serenity copied to clipboard
Fuzzers: Set up a fake browser environment for FuzzCSSParser
WIP! Looking for feedback from whoever actually understands any of the parts involved, unlike myself. :sweat_smile:
This is likely not super correct, but it does at least function for me now. (As far as I can tell - I don't know what FuzzFoo output is supposed to look like, but it seems happy.) The remaining issues are that I've hard-coded the fonts directory and default font query.
It's possible we could avoid needing font information entirely by not creating a Document but doing things manually instead? Not sure. This feels like way too much is being set up that we don't actually use - we just need a JS realm with the CSSOM intrinsics available.
Fixes #21629. Well, kinda.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
Not stale! Though I had forgotten about this. 😅
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
Same again. I can't believe this has been open 2 months. :thousandyakstare:
It's a bit sad that we have to do all this extra work, because some (more advanced) fuzzers actually trace inputs to get better results (and this will almost certainly throw them off a bit). Although, arguably, an inefficient fuzzer would still be a lot better than the current one.
Is there a chance that we can move any of the things before parse_css_stylesheet into the static initialization part? (And even that only helps the fuzzers that understand the way of libFuzzer, not sure if that includes oss-fuzz.)
Other than that, it looks OK, I guess...
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!
Stalebot pls
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!
I keep forgetting about this. 😅 (And possibly avoiding it...)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!