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

Create a structure-aware fuzzer (second try) #2169

Closed
wants to merge 18 commits into from

Conversation

addisoncrump
Copy link
Contributor

@addisoncrump addisoncrump commented Jul 6, 2022

This is a retry of #1902. Depends on #1954.

This PR adds two three experimental fuzzers which generate valid JavaScript code from Arbitrary structs. These fuzzers (or variants thereof) were used to identify all of my previous PRs and issues. It does not generate identifiers which resolve to built-in types.

I will link issues discovered by this fuzzer to this PR as they are discovered. As with last time, if you wish to test using this fuzzer, I would recommend using:

cargo fuzz run -s none interp_fuzzer -- -timeout=5

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #2169 (376c953) into main (48d8b42) will decrease coverage by 1.98%.
The diff coverage is 1.57%.

❗ Current head 376c953 differs from pull request most recent head 6887bcb. Consider uploading reports for the commit 6887bcb to get more accurate results

@@            Coverage Diff             @@
##             main    #2169      +/-   ##
==========================================
- Coverage   42.04%   40.06%   -1.99%     
==========================================
  Files         231      233       +2     
  Lines       21271    22356    +1085     
==========================================
+ Hits         8943     8956      +13     
- Misses      12328    13400    +1072     
Impacted Files Coverage Δ
boa_engine/src/context/mod.rs 30.83% <ø> (ø)
boa_engine/src/lib.rs 86.66% <ø> (ø)
boa_engine/src/syntax/ast/constant.rs 50.00% <ø> (ø)
boa_engine/src/syntax/ast/node/array/mod.rs 33.33% <ø> (ø)
boa_engine/src/syntax/ast/node/await_expr/mod.rs 28.57% <ø> (ø)
boa_engine/src/syntax/ast/node/block/mod.rs 50.00% <ø> (ø)
boa_engine/src/syntax/ast/node/call/mod.rs 69.23% <ø> (ø)
.../syntax/ast/node/conditional/conditional_op/mod.rs 64.28% <ø> (ø)
...x/ast/node/declaration/async_generator_decl/mod.rs 13.33% <0.00%> (ø)
...x/ast/node/declaration/async_generator_expr/mod.rs 5.55% <0.00%> (ø)
... and 59 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48d8b42...6887bcb. Read the comment docs.

@jedel1043 jedel1043 added enhancement New feature or request API ast Issue surrounding the abstract syntax tree labels Jul 6, 2022
@jedel1043 jedel1043 added this to the v0.16.0 milestone Jul 6, 2022
@addisoncrump
Copy link
Contributor Author

Note that (as part of this PR) we should add build step check to CI for fuzz with cargo fuzz build. Not entirely sure how to do that, though.

@addisoncrump
Copy link
Contributor Author

Added another fuzzer which checks for parser/interner idempotency. This should help find issues like #2148 and other tricky parser/interner bugs.

@addisoncrump addisoncrump force-pushed the experimental-fuzzer-2 branch 2 times, most recently from 7d86250 to 376c953 Compare July 7, 2022 17:44
@addisoncrump addisoncrump force-pushed the experimental-fuzzer-2 branch from 376c953 to 6887bcb Compare July 17, 2022 23:17
@Razican Razican modified the milestones: v0.16.0, v0.17.0 Sep 19, 2022
@addisoncrump
Copy link
Contributor Author

Closing in favour of new techniques.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API ast Issue surrounding the abstract syntax tree enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants