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

maitake: fix rust-lang/miri#3780, actually run Miri on CI #483

Merged
merged 3 commits into from
Aug 3, 2024

Commits on Aug 3, 2024

  1. test(maitake): Miri test for rust-lang/miri#3780 (#483)

    This reproduces a potential UB where a `task::Cell` gets niche-optimized
    in the `Joined` case. This is based on the test added to Tokio in
    tokio-rs/tokio#6744
    hawkw committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    19b30c3 View commit details
    Browse the repository at this point in the history
  2. fix(maitake): prevent task cell niche optimization (#483)

    See [this comment][1]. Adding `#[repr(C)]` to this type suppresses niche
    optimization, resolving potential unsoundness that could occur when the
    compiler decides to niche-optimize a self-referential future type. In
    practice this probably doesn't actually happen, but we should make sure
    it never does.
    
    [1]: rust-lang/miri#3780 (comment)
    hawkw committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    45cf523 View commit details
    Browse the repository at this point in the history
  3. chore(maitake): actually run loom tests on CI (#483)

    It turns out CI only ever runs Miri tests for `cordyceps`, not
    `maitake`/`maitake-sync`. MY BAD LOL.
    
    This PR fixes that. In doing so, I've also had to go through and change
    a bunch of tests to spawn fewer tasks when running under Miri, so that
    it doesn't take a really long time to run. Most of the issues we hope
    Miri catches don't actually depend on concurrency --- we have `loom`
    tests for that.
    hawkw committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    2b475ab View commit details
    Browse the repository at this point in the history