-
Notifications
You must be signed in to change notification settings - Fork 293
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
Correct is_unique for Bytes from shared BytesMut #718
Merged
Darksonn
merged 2 commits into
tokio-rs:v1.6.x
from
zyxw59:fix-buf-mut-shared-is-unique
Jul 12, 2024
Merged
Correct is_unique for Bytes from shared BytesMut #718
Darksonn
merged 2 commits into
tokio-rs:v1.6.x
from
zyxw59:fix-buf-mut-shared-is-unique
Jul 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks. Is there any chance we could have a test that would have caught this? |
Thank you for fixing this issue! I'm updating this PR to merge it directly onto the 1.6.0 tag so that I can make a 1.6.1 release with just this change. |
The `is_unique` entry in the vtable for `Bytes` created from a shared `BytesMut` just called the `shared_is_unique` function from the `bytes` module. However, that function dereferences the `data` argument` as `bytes::Shared`, but the actual underlying type is `bytes_mut::Shared`.
Darksonn
force-pushed
the
fix-buf-mut-shared-is-unique
branch
from
July 12, 2024 23:08
97a7850
to
4fe8b82
Compare
marcus0x62
added a commit
to marcus0x62/hickory-dns
that referenced
this pull request
Jul 13, 2024
Cargo audit is failing because bytes 1.6.0 has been yanked due to a bug: This release fixes a bug where `Bytes::is_unique` returns incorrect values when the `Bytes` originates from a shared `BytesMut` Upstream discussion: tokio-rs/bytes#718
djc
pushed a commit
to hickory-dns/hickory-dns
that referenced
this pull request
Jul 13, 2024
Cargo audit is failing because bytes 1.6.0 has been yanked due to a bug: This release fixes a bug where `Bytes::is_unique` returns incorrect values when the `Bytes` originates from a shared `BytesMut` Upstream discussion: tokio-rs/bytes#718
4 tasks
github-merge-queue bot
pushed a commit
to n0-computer/iroh
that referenced
this pull request
Jul 15, 2024
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> GitHub Actions `cargo deny` is failing at https://github.com/n0-computer/iroh/actions/runs/9928231752/job/27438879671 % `cargo update -p bytes` ``` Updating crates.io index Locking 1 package to latest compatible version Updating bytes v1.6.0 -> v1.6.1 note: pass `--verbose` to see 152 unchanged dependencies behind latest ``` https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md to get the fix in * tokio-rs/bytes#718 ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
github-merge-queue bot
pushed a commit
to astriaorg/astria
that referenced
this pull request
Jul 18, 2024
## Summary Updated the `bytes` and `ics23` crates. ## Background The version of `bytes` we currently use has been yanked due to [a bug](tokio-rs/bytes#718). Running `cargo audit` exposed this as an allowed warning. We also got a report of an issue with the `ics23` crate and a recommendation to update to v0.11.3. ## Changes - Ran `cargo update -p bytes` and `cargo update -p ics23`. ## Testing No additional tests required.
bharath-123
pushed a commit
to astriaorg/astria
that referenced
this pull request
Jul 25, 2024
## Summary Updated the `bytes` and `ics23` crates. ## Background The version of `bytes` we currently use has been yanked due to [a bug](tokio-rs/bytes#718). Running `cargo audit` exposed this as an allowed warning. We also got a report of an issue with the `ics23` crate and a recommendation to update to v0.11.3. ## Changes - Ran `cargo update -p bytes` and `cargo update -p ics23`. ## Testing No additional tests required.
rklaehn
pushed a commit
to n0-computer/iroh-blobs
that referenced
this pull request
Oct 22, 2024
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> GitHub Actions `cargo deny` is failing at https://github.com/n0-computer/iroh/actions/runs/9928231752/job/27438879671 % `cargo update -p bytes` ``` Updating crates.io index Locking 1 package to latest compatible version Updating bytes v1.6.0 -> v1.6.1 note: pass `--verbose` to see 152 unchanged dependencies behind latest ``` https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md to get the fix in * tokio-rs/bytes#718 ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
rklaehn
pushed a commit
to n0-computer/iroh-blobs
that referenced
this pull request
Oct 22, 2024
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> GitHub Actions `cargo deny` is failing at https://github.com/n0-computer/iroh/actions/runs/9928231752/job/27438879671 % `cargo update -p bytes` ``` Updating crates.io index Locking 1 package to latest compatible version Updating bytes v1.6.0 -> v1.6.1 note: pass `--verbose` to see 152 unchanged dependencies behind latest ``` https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md to get the fix in * tokio-rs/bytes#718 ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
matheus23
pushed a commit
to n0-computer/iroh-doctor
that referenced
this pull request
Oct 22, 2024
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> GitHub Actions `cargo deny` is failing at https://github.com/n0-computer/iroh/actions/runs/9928231752/job/27438879671 % `cargo update -p bytes` ``` Updating crates.io index Locking 1 package to latest compatible version Updating bytes v1.6.0 -> v1.6.1 note: pass `--verbose` to see 152 unchanged dependencies behind latest ``` https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md to get the fix in * tokio-rs/bytes#718 ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
matheus23
pushed a commit
to n0-computer/iroh
that referenced
this pull request
Nov 14, 2024
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> GitHub Actions `cargo deny` is failing at https://github.com/n0-computer/iroh/actions/runs/9928231752/job/27438879671 % `cargo update -p bytes` ``` Updating crates.io index Locking 1 package to latest compatible version Updating bytes v1.6.0 -> v1.6.1 note: pass `--verbose` to see 152 unchanged dependencies behind latest ``` https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md to get the fix in * tokio-rs/bytes#718 ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
is_unique
entry in the vtable forBytes
created from a sharedBytesMut
just called theshared_is_unique
function from thebytes
module. However, that function dereferences thedata
argument ascrate::bytes::Shared
, but the actual underlying type iscrate::bytes_mut::Shared
.