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

Rework decoding of Boxes, Rcs, Arcs, arrays and enums (stack overflow fix) #426

Merged
merged 38 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3de9943
Rework decoding of `Box`es, `Rc`s, `Arc`s and arrays
koute Apr 20, 2023
3ec39d5
Update changelog
koute Apr 20, 2023
7c448c4
Bump version to 3.5.0
koute Apr 20, 2023
0f4aa11
Fix typo
koute Apr 20, 2023
68defc9
Reduce the size of an array in tests to make miri not run forever
koute Apr 20, 2023
7473b11
Make the `TypeInfo` match exhaustive
koute Apr 20, 2023
604a1d7
Update dependencies
koute Apr 20, 2023
99f3cdf
Update benchmarks to criterion 0.4
koute Apr 20, 2023
9a95237
Update `BitVec` benchmarks too
koute Apr 20, 2023
3cc3cf1
Fix the benchmarks for real this time
koute Apr 20, 2023
80b7933
Use `Layout::new` instead of `Layout::from_size_align`
koute Apr 20, 2023
8abacbc
Move blanket decoding of wrapper types into a default impl
koute Apr 24, 2023
ba7b10d
Fix stack overflow when decoding big nested enums
koute Apr 24, 2023
3ccc37c
Bump version of `parity-scale-codec-derive` to 3.5.0
koute Apr 24, 2023
d13acad
Move the crate-level docs into README and include README as docs
koute Apr 24, 2023
f6ebb90
Add a note regarding deserializing big arrays to the README
koute Apr 24, 2023
60cf927
Update the CHANGELOG again
koute Apr 24, 2023
9f1c4a6
Remove one of the intermediate casts
koute Apr 24, 2023
42c7456
Merge remote-tracking branch 'origin/master' into master_fix_stack_ov…
koute May 8, 2023
87f5a7e
README cleanups
koute May 8, 2023
01be002
Add `rust` markers and make indentation consistent in README snippets
koute May 8, 2023
bc4bda8
Make `max-encoded-len` feature not force-enable `parity-scale-codec-d…
koute May 8, 2023
c2732a3
Reexport derive macros not when `parity-scale-codec-derive` is enable…
koute May 8, 2023
645d6a6
Update CHANGELOG again
koute May 8, 2023
0958c9e
Fix `parity-scale-codec-derive` tests compilation
koute May 8, 2023
4c1db17
Merge remote-tracking branch 'origin/master' into master_fix_stack_ov…
koute May 16, 2023
b47acfd
Update `serde`
koute May 16, 2023
e44bfc6
Update comment in `src/codec.rs`
koute Jun 15, 2023
55e97ee
Update comment in `src/codec.rs`
koute Jun 15, 2023
73f09b2
Merge remote-tracking branch 'origin/master' into master_fix_stack_ov…
koute Jun 15, 2023
edc4e78
Move the version bounds for `parity-scale-codec-derive`
koute Jun 15, 2023
1de33ec
Remove `DecodeContext`
koute Jun 15, 2023
f50f0e3
Move the array byte size calculations to compile-time
koute Jun 15, 2023
75c8549
Add a TODO about `Box::assume_init`
koute Jun 15, 2023
4d4fb7c
Move `DecodeFinished` into its own module
koute Jun 15, 2023
1822891
Add a TODO about `MaybeUninit::slice_assume_init_mut`
koute Jun 15, 2023
afff672
Update the changelog
koute Jun 15, 2023
1dd636a
`std` -> `core` so that no_std compiles
koute Jun 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this crate are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this crate adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.5.0]

### Added

- Added `Decode::decode_into` to allow deserializing into unitialized memory.
- Added `DecodeContext` and `DecodeFinished` types to be used with `Decode::decode_into`.

### Fixed

- Trying to deserialize a big boxed array (e.g. `Box<[u8; 1024 * 1024 * 1024]>`) won't overflow the stack anymore.
- Trying to deserialize big nested enums with many variants won't overflow the stack anymore.
- Elements of partially read arrays will now be properly dropped if the whole array wasn't decoded.

## [3.4.0]

This release renders the `full` feature defunct. The implementations guarded behind
Expand Down
Loading