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

Revert recent change to avoid using Arc:ptr_eq #29

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

rib
Copy link
Owner

@rib rib commented Dec 20, 2022

Due to a clippy warning about Arc::ptr_eq potentially comparing vtable meta data associated with wide pointers there was a recent change to explicitly only check the address pointers and discard any wide pointer meta data.

The Rust libs team has since resolved to update Arc::ptr_eq so that it doesn't compare meta data for the wrapped value (such as a dyn trait vtable):
rust-lang/rust#103763

In the meantime we can silence this clippy suggestion since the vtable is benign in this case anyway:
rust-lang/rust-clippy#6524

Fixes: #26

Due to a clippy warning about Arc::ptr_eq potentially comparing
vtable meta data associated with wide pointers there was a recent
change to explicitly only check the address pointers and discard
any wide pointer meta data.

The Rust libs team has since resolved to update Arc::ptr_eq so that it
doesn't compare meta data for the wrapped value (such as a dyn trait
vtable):
rust-lang/rust#103763

In the meantime we can silence this clippy suggestion since the vtable
is benign in this case anyway:
rust-lang/rust-clippy#6524
@rib rib merged commit 76128d3 into master Dec 20, 2022
@rib rib deleted the re-add-use-of-arc-ptr-eq branch December 20, 2022 20:11
// In the meantime we can silence this clippy suggestion since the vtable is
// benign in this case anyway:
// https://github.com/rust-lang/rust-clippy/issues/6524
#[allow(clippy::vtable_address_comparisons)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop this now, the fix seems to have landed in 1.72 😬

rust-lang/rust#106450

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, small world.

thanks for the update.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for backlinking the whole thing, I ran into this for an unrelated (non-Android 😉) project and wouldn't have otherwise found that it was addressed in Rust 1.72 without existing clippy issues being updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revert back to using Arc::ptr_eq in verifier
2 participants