10 KiB
Unreleased
Released YYYY-MM-DD.
Added
- TODO (or remove section if none)
Changed
- TODO (or remove section if none)
Deprecated
- TODO (or remove section if none)
Removed
- TODO (or remove section if none)
Fixed
- TODO (or remove section if none)
Security
- TODO (or remove section if none)
1.1.0
Released 2022-02-09.
Added
-
Added the
Unstructured::ratiomethod to generate a boolean that istrueat the given rate. -
Added the
Unstructured::arbitrary_loopmethod to call a function an arbitrary number of times.
1.0.3
Released 2021-11-20.
Fixed
- Fixed documentation for
Unstructured::fill_bytes. We forgot to update this way back in #53 when the behavior changed.
1.0.2
Released 2021-08-25.
Added
Arbitraryimpls forHashMaps andHashSets with customHashers #87
1.0.1
Released 2021-05-20.
Added
Arbitraryimpls forNonZeroXtypes #79Arbitraryimpls for all arrays using const generics #55Arbitraryimpls forIpv4AddrandIpv6Addr#84
Fixed
1.0.0
Released 2020-02-24.
See 1.0.0-rc1 and 1.0.0-rc2 for changes since 0.4.7, which was the last main line release.
1.0.0-rc2
Released 2021-02-09.
Added
- The
Arbitrarytrait is now implemented for&[u8]. #67
Changed
- Rename
Unstructured#get_bytestoUnstructured#bytes. #70 - Passing an empty slice of choices to
Unstructured#choosereturns an error. Previously it would panic. 71
1.0.0-rc1
Released 2020-11-25.
Added
- The
Arbitrarytrait is now implemented for&str. #63
Changed
- The
Arbitrarytrait now has a lifetime parameter, allowingArbitraryimplementations that borrow from the raw input (e.g. the new&strimplementaton). Thederive(Arbitrary)macro also supports derivingArbitraryon types with lifetimes now. #63
Removed
-
The
shrinkmethod on theArbitrarytrait has been removed.We have found that, in practice, using internal reduction via approaches like
cargo fuzz tmin, where the raw input bytes are reduced rather than theT: Arbitrarytype constructed from those raw bytes, has the best efficiency-to-maintenance ratio. To the best of our knowledge, no one is relying on or using theArbitrary::shrinkmethod. If you are using and relying on theArbitrary::shrinkmethod, please reach out by dropping a comment here and explaining how you're using it and what your use case is. We'll figure out what the best solution is, including potentially adding shrinking functionality back to thearbitrarycrate.
0.4.7
Released 2020-10-14.
Added
-
Added an optimization to avoid unnecessarily consuming bytes from the underlying data when there is only one possible choice in
Unstructured::{int_in_range, choose, etc..}. -
Added license files to the derive crate.
Changed
- The
Arbitraryimplementation forstd::time::Durationshould now be faster and produce durations with a more-uniform distribution of nanoseconds.
0.4.6
Released 2020-08-22.
Added
- Added the
Unstructured::peek_bytesmethod.
Changed
-
Test case reduction via
cargo fuzz tminshould be much more effective at reducing the sizes of collections now. (See #53 and the commit messages for details.) -
Fuzzing with mutation-based fuzzers (like libFuzzer) should be more efficient now. (See #53 and the commit messages for details)
0.4.5
Released 2020-06-18.
Added
- Implement
Arbitraryfor zero length arrays. - Implement
ArbitraryforRangeandRangeInclusive.
0.4.4
Released 2020-04-29.
Fixed
- Fixed the custom derive for enums when used via its full path (like
#[derive(arbitrary::Arbitrary)]rather than like#[derive(Arbitrary)]).
0.4.3
Released 2020-04-28.
Fixed
- Fixed the custom derive when used via its full path (like
#[derive(arbitrary::Arbitrary)]rather than like#[derive(Arbitrary)]).
0.4.2
Released 2020-04-17.
Changed
- We forgot to release a new version of the
derive_arbitrarycrate last release. This release fixes that and so thesynstructuredependency is finally actually removed in the cargo releases.
0.4.1
Released 2020-03-18.
Removed
- Removed an internal dependency on the
synstructurecrate when thederivefeature is enabled. This should not have any visible downstream effects other than faster build times!
0.4.0
Released 2020-01-22.
This is technically a breaking change, but we expect that nearly everyone should
be able to upgrade without any compilation errors. The only exception is if you
were implementing the Arbitrary::size_hint method by hand. If so, see the
"changed" section below and the API docs for
Arbitrary::shrink
for details.
Added
- Added the
arbitary::size_hint::recursion_guardhelper function for guarding against infinite recursion insize_hintimplementations for recursive types.
Changed
- The
Arbitrary::size_hintsignature now takes adepth: usizeparameter. This should be passed along unmodified to any nested calls of othersize_hintmethods. If you're implementingsize_hintfor a recursive type (like a linked list or tree) or a generic type with type parameters, you should use the newarbitrary::size_hint::recursion_guardhelper function.
Fixed
- Fixed infinite recursion in generated
size_hintimplementations from#[derive(Arbitrary)]for recursive types.
0.3.2
Released 2020-01-16.
Changed
- Updated the custom derive's dependencies.
0.3.2
Released 2020-01-15.
Fixed
- Fixed an over-eager assertion condition in
Unstructured::int_in_rangethat would incorrectly trigger when given valid ranges of length one.
0.3.1
Released 2020-01-14.
Fixed
- Fixed some links and version numbers in README.
0.3.0
Released 2020-01-14.
Added
- Added the
"derive"cargo feature, to enable#[derive(Arbitrary)]for custom types. Enabling this feature re-exports functionality from thederive_arbitrarycrate. - The custom derive for
Arbitraryimplements the shrink method for you now. - All implementations of
Arbitraryforstdtypes implement shrinking now. - Added the
Arbitrary::arbitrary_take_restmethod allows anArbitraryimplementation to consume all of the rest of the remaining raw input. It has a default implementation that forwards toArbitrary::arbitraryand the custom derive creates a smart implementation for your custom types. - Added the
Arbitrary::size_hintmethod for hinting how many raw bytes an implementation needs to construct itself. This has a default implementation, but the custom derive creates a smart implementation for your custom types. - Added the
Unstructured::choosemethod to choose one thing among a set of choices. - Added the
Unstructured::arbitrary_lenmethod to get an arbitrary length for a collection of some arbitrary type. - Added the
Unstructured::arbitrary_itermethod to create an iterator of arbitrary instance of some type.
Changed
- The
Arbitrarytrait was simplified a bit. Unstructuredis a concrete type now, not a trait.- Switched to Rust 2018 edition.
Removed
RingBufferandFiniteBufferare removed. UseUnstructuredinstead.
Fixed
- Better
Arbitraryimplementation forchar. - Better
Arbitraryimplementation forString.