diff options
author | David LeGare <legare@google.com> | 2022-06-28 16:23:35 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-06-28 16:23:35 +0000 |
commit | e96936d0086bb5a8c308910cd48151ce8a83df14 (patch) | |
tree | 4c6ff137e3d9c7716b0a7e4a5ff39eb7eb842392 | |
parent | db57b818e6ea3bc597e196c4756d40d1955fe56b (diff) | |
parent | b802079c87f54f9c82e4c27f669e467ed338e359 (diff) | |
download | arbitrary-e96936d0086bb5a8c308910cd48151ce8a83df14.tar.gz |
Upgrade rust/crates/arbitrary to 1.1.3 am: 9833b5f41e am: b802079c87
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/arbitrary/+/2137475
Change-Id: I1a72606262b0a95a50253c51ba8ca9858e2e7d00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | CHANGELOG.md | 17 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 6 | ||||
-rw-r--r-- | src/lib.rs | 32 |
7 files changed, 46 insertions, 25 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 7b04689..b93af77 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "34be5b6d3d3bb513358e80453984652c88e07b75" + "sha1": "8e7b857f4f78b06920a36212ed2f392bc523c1f6" }, "path_in_vcs": "" }
\ No newline at end of file @@ -42,7 +42,7 @@ rust_test { host_supported: true, crate_name: "arbitrary", cargo_env_compat: true, - cargo_pkg_version: "1.1.2", + cargo_pkg_version: "1.1.3", srcs: ["src/lib.rs"], test_suites: ["general-tests"], auto_gen_config: true, @@ -62,7 +62,7 @@ rust_test { host_supported: true, crate_name: "arbitrary", cargo_env_compat: true, - cargo_pkg_version: "1.1.2", + cargo_pkg_version: "1.1.3", srcs: ["tests/derive.rs"], test_suites: ["general-tests"], auto_gen_config: true, @@ -85,7 +85,7 @@ rust_library_rlib { host_supported: true, crate_name: "arbitrary", cargo_env_compat: true, - cargo_pkg_version: "1.1.2", + cargo_pkg_version: "1.1.3", srcs: ["src/lib.rs"], edition: "2018", features: [ diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e5142..656329c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,22 @@ Released YYYY-MM-DD. -------------------------------------------------------------------------------- -## Unreleased +## 1.1.3 + +Released 2022-06-23. + +### Fixed + +* Fixed some potential (but highly unlikely) name-clashes inside + `derive(Arbitrary)`'s generated + code. [#111](https://github.com/rust-fuzz/arbitrary/pull/111) +* Fixed an edge case where `derive(Arbitrary)` for recursive types that detected + an overflow would not reset the overflow + detection. [#111](https://github.com/rust-fuzz/arbitrary/pull/111) + +-------------------------------------------------------------------------------- + +## 1.1.2 Released 2022-06-16. @@ -12,7 +12,7 @@ [package] edition = "2018" name = "arbitrary" -version = "1.1.2" +version = "1.1.3" authors = [ "The Rust-Fuzz Project Developers", "Nick Fitzgerald <fitzgen@gmail.com>", @@ -42,7 +42,7 @@ path = "./tests/derive.rs" required-features = ["derive"] [dependencies.derive_arbitrary] -version = "1.1.2" +version = "1.1.3" optional = true [dev-dependencies] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 01af004..9d600f3 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "arbitrary" -version = "1.1.2" # Make sure this matches the derive crate version +version = "1.1.3" # Make sure this matches the derive crate version authors = [ "The Rust-Fuzz Project Developers", "Nick Fitzgerald <fitzgen@gmail.com>", @@ -19,7 +19,7 @@ repository = "https://github.com/rust-fuzz/arbitrary/" documentation = "https://docs.rs/arbitrary/" [dependencies] -derive_arbitrary = { version = "1.1.2", path = "./derive", optional = true } +derive_arbitrary = { version = "1.1.3", path = "./derive", optional = true } [dev-dependencies] @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/arbitrary/arbitrary-1.1.2.crate" + value: "https://static.crates.io/crates/arbitrary/arbitrary-1.1.3.crate" } - version: "1.1.2" + version: "1.1.3" license_type: NOTICE last_upgrade_date { year: 2022 month: 6 - day: 16 + day: 27 } } @@ -140,12 +140,15 @@ pub trait Arbitrary<'a>: Sized { /// Arbitrary>::arbitrary` to construct an arbitrary instance of `MyType` /// from that unstuctured data. /// - /// Implementation may return an error if there is not enough data to - /// construct a full instance of `Self`. This is generally OK: it is better - /// to exit early and get the fuzzer to provide more input data, than it is - /// to generate default values in place of the missing data, which would - /// bias the distribution of generated values, and ultimately make fuzzing - /// less efficient. + /// Implementations may return an error if there is not enough data to + /// construct a full instance of `Self`, or they may fill out the rest of + /// `Self` with dummy values. Using dummy values when the underlying data is + /// exhausted can help avoid accidentally "defeating" some of the fuzzer's + /// mutations to the underlying byte stream that might otherwise lead to + /// interesting runtime behavior or new code coverage if only we had just a + /// few more bytes. However, it also requires that implementations for + /// recursive types (e.g. `struct Foo(Option<Box<Foo>>)`) avoid infinite + /// recursion when the underlying data is exhausted. /// /// ``` /// # #[cfg(feature = "derive")] fn foo() { @@ -174,11 +177,13 @@ pub trait Arbitrary<'a>: Sized { /// See also the documentation for [`Unstructured`][crate::Unstructured]. fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>; - /// Generate an arbitrary value of `Self` from the entirety of the given unstructured data. + /// Generate an arbitrary value of `Self` from the entirety of the given + /// unstructured data. /// - /// This is similar to Arbitrary::arbitrary, however it assumes that it is the - /// last consumer of the given data, and is thus able to consume it all if it needs. - /// See also the documentation for [`Unstructured`][crate::Unstructured]. + /// This is similar to Arbitrary::arbitrary, however it assumes that it is + /// the last consumer of the given data, and is thus able to consume it all + /// if it needs. See also the documentation for + /// [`Unstructured`][crate::Unstructured]. fn arbitrary_take_rest(mut u: Unstructured<'a>) -> Result<Self> { Self::arbitrary(&mut u) } @@ -208,9 +213,10 @@ pub trait Arbitrary<'a>: Sized { /// of lengths bounded by these parameters. This applies to both /// [`Arbitrary::arbitrary`] and [`Arbitrary::arbitrary_take_rest`]. /// - /// This is trivially true for `(0, None)`. To restrict this further, it must be proven - /// that all inputs that are now excluded produced redundant outputs which are still - /// possible to produce using the reduced input space. + /// This is trivially true for `(0, None)`. To restrict this further, it + /// must be proven that all inputs that are now excluded produced redundant + /// outputs which are still possible to produce using the reduced input + /// space. /// /// ## The `depth` Parameter /// |