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

Run Miri everywhere #269

Merged
merged 3 commits into from
Oct 6, 2023
Merged

Run Miri everywhere #269

merged 3 commits into from
Oct 6, 2023

Conversation

danielsn
Copy link
Contributor

@danielsn danielsn commented Oct 5, 2023

What does this PR do?

  1. Runs Miri in CI on all of the library, not just profiling
  2. Explicitly "ignores" the tests where Miri cannot currently run

Motivation

Miri is great for catching bugs, and as much of the library as possible should take advantage of that.

Additional Notes

  1. Miri does not run on Tokio tests for now: Don't start the reactor when running Miri tokio-rs/tokio#3360
  2. Miri cannot be directly disabled on doc-tests, so I had to use a slightly ugly patch there cargo miri test does not run doc-tests rust-lang/miri#584 (comment)
  3. None of the issues I saw appeared to be bugs: they generally related to syscalls that Miri doesn't currently support. We should investigate enabling these tests as Miri advances

How to test the change?

Should just run in the CI

Describe here in detail how the change can be validated.

For Reviewers

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Copy link
Contributor

@morrisonlevi morrisonlevi left a comment

Choose a reason for hiding this comment

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

Looks good to me, unless some specific team doesn't want to add #[cfg_attr(miri, ignore)] to every new test to some subdirectory.

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

Looks really good! 👍

@danielsn danielsn merged commit 340d728 into main Oct 6, 2023
16 of 18 checks passed
@danielsn danielsn deleted the dsn/miri-everywhere branch October 6, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants