Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

[Serde generate] runtimes: negative fuzzing + UTF8 validation + max container depth #61

Merged
merged 11 commits into from
Sep 19, 2020
Merged

[Serde generate] runtimes: negative fuzzing + UTF8 validation + max container depth #61

merged 11 commits into from
Sep 19, 2020

Conversation

ma2bd
Copy link
Contributor

@ma2bd ma2bd commented Sep 18, 2020

Summary

  • Use Rust as a baseline to test that supported languages reject incorrect byte strings during LCS deserialization
  • Introduce a generated list of "negative" samples for this purpose. Samples are typically obtained by flipping the highest bit of a byte in a valid sample, and testing if Rust can deserialize.
  • In all languages, we now also mutate "positive samples" and check that they always decode to a different value (by canonicity)
  • The new testing approach covers exceeding input bytes, UTF8 validation, boolean decoding, map key ordering, the length limit of sequences, and the limit on container depth.
  • Also, fix a codegen issue in golang for containers of the form struct Foo(Option<T>)

Test Plan

CI

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 18, 2020
@ma2bd ma2bd marked this pull request as ready for review September 18, 2020 03:46
@ma2bd ma2bd requested a review from xli September 18, 2020 03:46
@ma2bd ma2bd merged commit 9d7cfd1 into novifinancial:master Sep 19, 2020
@ma2bd ma2bd deleted the serdegen_testing_plus branch September 19, 2020 01:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants