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

xtask: Enable strict provenance checks in Miri #666

Merged
merged 1 commit into from
Mar 4, 2023

Conversation

nicholasbishop
Copy link
Member

I noticed while testing #662 that Miri is printing some useful warnings about pointer/integer casts. Enabling the -Zmiri-strict-provenance flag turns these warnings into errors so that they'll fail CI, otherwise it's easy to miss them.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

// around until our minimum-supported nightly version is at
// least 2022-11-10.
if !is_target_installed(target.as_triple())? {
cmd.args(["-Zbuild-std=core,alloc"]);
Copy link
Member

@phip1611 phip1611 Feb 27, 2023

Choose a reason for hiding this comment

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

We just merged #585 .. so this can be omitted, I guess?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops! Not quite sure how that code snuck back in here, fixed.

@phip1611
Copy link
Member

Wonderful, nice catch! strict pointer provenance and its analysis is still under development to my knowledge. So we probably can expect that working code might fail in future nightly versions because of additional checks, right?

@nicholasbishop
Copy link
Member Author

Wonderful, nice catch! strict pointer provenance and its analysis is still under development to my knowledge. So we probably can expect that working code might fail in future nightly versions because of additional checks, right?

Yep, I think that's correct. Probably also generally true for any Miri thing actually, I don't think there are any stability guarantees on what it checks right now, but pointer provenance is maybe more likely to give the occasional nightly failure.

@phip1611 phip1611 force-pushed the bishop-strict-prov branch from 79c4ef7 to d8e469c Compare March 2, 2023 13:02
@phip1611 phip1611 merged commit 473c9e7 into rust-osdev:main Mar 4, 2023
@nicholasbishop nicholasbishop deleted the bishop-strict-prov branch March 4, 2023 16:22
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