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

Add recursive data cost to fuzzer + speed up deserialize_any identifier check #506

Merged
merged 2 commits into from
Sep 17, 2023

Conversation

juntyr
Copy link
Member

@juntyr juntyr commented Sep 17, 2023

Adding layers, e.g. enum variants or tuples, is not without cost in the format, so let's enforce that in the fuzzer as well.

Checking for an identifier in deserialize_any previously used the identifier parser, which has complex error handling to produce nice error messages. Since we only need to check if one is there, we now use skip_identifier, which now returns Option<&str> instead of bool, and thus avoids any allocation in the check.

* [ ] I've included my change in CHANGELOG.md

  • Fix the code coverage regression

Sorry, something went wrong.

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (817407c) 100.00% compared to head (10f1e97) 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #506   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           78        78           
  Lines        11053     11063   +10     
=========================================
+ Hits         11053     11063   +10     
Files Changed Coverage Δ
src/de/mod.rs 100.00% <100.00%> (ø)
src/parse.rs 100.00% <100.00%> (ø)
tests/438_rusty_byte_strings.rs 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juntyr juntyr merged commit 4697142 into ron-rs:master Sep 17, 2023
@juntyr juntyr deleted the fuzzer-recursive-cost branch September 17, 2023 15:14
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.

None yet

2 participants