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

Fix miri failures by preserving provenance in BitSpan::new_unchecked #153

Conversation

niluxv
Copy link

@niluxv niluxv commented Dec 25, 2021

It seems the fix for the miri failures proposed by @tavianator hasn't been committed yet so I gave it a go.

Fix the miri failures in doctests, see issue #135. The issue is that miri doesn't guess correct provenance in the int-to-ptr cast in BitSpan::new_unchecked, as was found by @tavianator here.

The solution is to preserve provenance and was proposed by @tavianator here. With this change the entire test suite passes under miri.

Fix the miri failures in doctests, see issue ferrilab#135. The issue is that miri doesn't guess
correct provenance in the int-to-ptr cast in `BitSpan::new_unchecked`, as was found by
@tavianator [here](rust-lang/miri#1866 (comment)).

The solution is to preserve provenance and was proposed by  @tavianator
[here](rust-lang/miri#1866 (comment)).
With this change the entire test suite passes under miri.
@myrrlyn
Copy link
Collaborator

myrrlyn commented Jan 5, 2022

I did this myself without looking at my PRs; my apologies.

@myrrlyn myrrlyn closed this Jan 5, 2022
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.

2 participants