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

Miri subtree update #129785

Merged
merged 55 commits into from
Aug 31, 2024
Merged

Miri subtree update #129785

merged 55 commits into from
Aug 31, 2024

Commits on Aug 19, 2024

  1. provenance_gc: fix comment

    RalfJung committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    4abdcd7 View commit details
    Browse the repository at this point in the history
  2. make the cleanup functions private

    also move "is there a borrow tracker" check out of the loop
    RalfJung committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    4001f59 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. Configuration menu
    Copy the full SHA
    e698ca1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3a423fc View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#3834 - sun-jacobi:tb-comment, r=RalfJung

    Fix a misleading comment in `tests/pass/tree_borrows/tree-borrows.rs`
    
    The original comment is somewhat misleading.
    
    Since we don't add a protector for `x` here, `f` should be allowed to deallocate `x`.
    bors committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    e881c42 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#3835 - JoJoDeveloping:tb-fix-stack-overflow, …

    …r=RalfJung
    
    Avoid extra copy by using `retain_mut` and moving the deletion into the closure
    
    Fixes the FIXME introduced in rust-lang#3833. Thanks to `@dmitrii-ubskii` for the idea 🙂
    bors committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    b8c02eb View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2024

  1. Configuration menu
    Copy the full SHA
    7f968ba View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#3840 - RalfJung:pipe-to-array, r=RalfJung

    fix calling pipe, pipe2, socketpair with a pointer-to-array
    
    Fixes rust-lang/miri#3839
    bors committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    17659eb View commit details
    Browse the repository at this point in the history
  3. epoll: Add EINVAL case

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    14f22c6 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#3836 - tiif:einval_ctl, r=oli-obk

    epoll: Add a EINVAL case
    
    In ``epoll_ctl`` documentation, it is mentioned that:
    > EINVAL epfd is not an epoll file descriptor, or fd is the same as epfd, or the requested operation op is not supported by this interface.
    
    So I added this EINVAL case for ``epfd == fd`` in ``epoll_ctl``
    bors committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    3a9e63c View commit details
    Browse the repository at this point in the history
  5. Handle edge case for epoll_ctl

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    23f308b View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#3829 - tiif:edgecase, r=oli-obk

    epoll: handle edge case for epoll_ctl
    
    There is a test case that revealed that our implementation differs from the real system:
     - Set up an epoll watching the FD
    - Call epoll_wait
    - Set up another epoll watching the same FD
    - Call epoll_wait on the first epoll. Nothing should be reported!
    
    This happened because, in ``epoll_ctl``, we used ``check_and_update_readiness``, which is a function that would return notification for all epoll file description that registered a particular file description. But we shouldn't do that because no notification should be returned if there is no I/O activity between two ``epoll_wait`` (every first ``epoll_wait`` that happens after ``epoll_ctl`` is an exception, we should return notification that reflects the readiness of file description).
    
    r? `@oli-obk`
    bors committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    dbfd066 View commit details
    Browse the repository at this point in the history
  7. Support blocking for epoll

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    f71cdbb View commit details
    Browse the repository at this point in the history
  8. Improve comment

    Co-authored-by: Ralf Jung <post@ralfj.de>
    tiif and RalfJung committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    e8175a4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    41ab4ec View commit details
    Browse the repository at this point in the history
  10. Rename event to events

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    36235b9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cd67e47 View commit details
    Browse the repository at this point in the history
  12. Change timeout value

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    8f178e4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7aff711 View commit details
    Browse the repository at this point in the history
  14. Fix error introduced by rebase

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    a4d7564 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7e8ca57 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    25ca855 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7d5be06 View commit details
    Browse the repository at this point in the history
  18. Add 0 preemption rate flag

    tiif committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    09993ce View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. Configuration menu
    Copy the full SHA
    0ed13eb View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Preparing for merge from rustc

    The Miri Cronjob Bot committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    e01bc04 View commit details
    Browse the repository at this point in the history
  2. Merge from rustc

    The Miri Cronjob Bot committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    55fba66 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9fb611c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f13379 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    25e5ac4 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Auto merge of rust-lang#3827 - RalfJung:gc-comment, r=RalfJung

    provenance_gc: fix comment
    
    Fixes rust-lang/miri#3826
    
    r? `@saethlin`
    bors committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    eb7bf6e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f8fb3c View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#3849 - RalfJung:tb-test, r=RalfJung

    tree_borrows test: ensure we can actually read the variable
    bors committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    9f35309 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    664640f View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#3847 - JoJoDeveloping:master, r=RalfJung

    Disable tree traversal optimization that is wrong due to lazy nodes.
    
    See rust-lang#3846 for more information.
    
    For now, the optimization is disabled in a very "hotfix" way, while we think about potential fixes. Nonetheless, this fixes rust-lang#3846
    bors committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    9b82f3b View commit details
    Browse the repository at this point in the history
  6. Make TB tree traversal bottom-up

    In preparation for rust-lang#3837, the tree traversal needs to be made bottom-up,
    because the current top-down tree traversal, coupled with that PR's
    changes to the garbage collector, can introduce non-deterministic error
    messages if the GC removes a parent tag of the accessed tag that would
    have triggered the error first.
    
    This is a breaking change for the diagnostics emitted by TB. The
    implemented semantics stay the same.
    JoJoDeveloping committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    2765444 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5be5cec View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#3843 - JoJoDeveloping:tb-bottom-up-iteration,…

    … r=RalfJung
    
    Make TB tree traversal bottom-up
    
    In preparation for rust-lang#3837, the tree traversal needs to be made bottom-up, because the current top-down tree traversal, coupled with that PR's changes to the garbage collector, can introduce non-deterministic error messages if the GC removes a parent tag of the accessed tag that would have triggered the error first.
    
    This is a breaking change for the diagnostics emitted by TB. The implemented semantics stay the same.
    bors committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    4318bfe View commit details
    Browse the repository at this point in the history
  9. Make Tree Borrows Provenance GC compact the tree

    Follow-up on rust-lang#3833 and rust-lang#3835. In these PRs, the TB GC was fixed to no
    longer cause a stack overflow. One test that motivated it was the test
    `fill::horizontal_line` in `tiny_skia`. But not causing stack overflows
    was not a large improvents, since it did not fix the fundamental issue:
    The tree was too large. The test now ran, but it required gigabytes of
    memory and hours of time, whereas it finishes within seconds in Stacked
    Borrows.
    
    The problem in that test was that it used [`slice::chunked`](https://doc.rust-lang.org/std/primitive.slice.html#method.chunks) to iterate
    a slice in chunks. That iterator is written to reborrow at each call to
    `next`, which creates a linear tree with a bunch of intermediary nodes,
    which also fragments the `RangeMap` for that allocation.
    
    The solution is to now compact the tree, so that these interior nodes
    are removed. Care is taken to not remove nodes that are protected, or
    that otherwise restrict their children.
    JoJoDeveloping committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    e26779e View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#3804 - tiif:blockit, r=oli-obk

    Support blocking for epoll
    
    This PR enabled epoll to have blocking operation.
    
    The changes introduced by this PR are:
    - Refactored part of the logic in ``epoll_wait`` to ``blocking_epoll_callback``
    - Added a new field ``thread_ids`` in ``Epoll`` for blocked thread ids
    - Added a new ``BlockReason::Epoll``
    bors committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    2d69baa View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Preparing for merge from rustc

    The Miri Cronjob Bot committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    ae3c270 View commit details
    Browse the repository at this point in the history
  2. Merge from rustc

    The Miri Cronjob Bot committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    f4f3447 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3a655aa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    abcfc17 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#3848 - tiif:tokiotest, r=RalfJung

    Add tokio io test
    
    After rust-lang#3804 landed, these tests passed.
    bors committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    79115f5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e34f35e View commit details
    Browse the repository at this point in the history
  7. address nits

    JoJoDeveloping committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    84134c6 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#3837 - JoJoDeveloping:tb-compacting-provenanc…

    …e-gc, r=RalfJung
    
    Make Tree Borrows Provenance GC compact the tree
    
    Follow-up on rust-lang#3833 and rust-lang#3835. In these PRs, the TB GC was fixed to no longer cause a stack overflow. One test that motivated it was the test `fill::horizontal_line` in [`tiny-skia`](https://github.com/RazrFalcon/tiny-skia). But not causing stack overflows was not a large improvents, since it did not fix the fundamental issue: The tree was too large. The test now ran, but it required gigabytes of memory and hours of time (only for it to be OOM-killed 🤬), whereas it finishes within 24 seconds in Stacked Borrows. With this merged, it finishes in about 40 seconds under TB.
    
    The problem in that test was that it used [`slice::chunked`](https://doc.rust-lang.org/std/primitive.slice.html#method.chunks) to iterate a slice in chunks. That iterator is written to reborrow at each call to `next`, which creates a linear tree with a bunch of intermediary nodes, which also fragments the `RangeMap` for that allocation.
    
    The solution is to now compact the tree, so that these interior nodes are removed. Care is taken to not remove nodes that are protected, or that otherwise restrict their children.
    
    I am currently only 99% sure that this is sound, and I do also think that this could compact even more. So `@Vanille-N` please also have a look at whether I got the compacting logic right.
    
    For a more visual comparison, [here is a gist](https://gist.github.com/JoJoDeveloping/ae4a7f7c29335a4c233ef42d2f267b01) of what the tree looks like at one point during that test, with and without compacting.
    
    This new GC requires a different iteration order during accesses (since the current one can make the error messages non-deterministic), so it is rebased on top of rust-lang#3843 and requires that PR to be merged first.
    bors committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    9ad0f65 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Preparing for merge from rustc

    The Miri Cronjob Bot committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    b0c3324 View commit details
    Browse the repository at this point in the history
  2. Merge from rustc

    The Miri Cronjob Bot committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    a10633a View commit details
    Browse the repository at this point in the history
  3. fix wasm test

    RalfJung committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    b5be3ab View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ad7a1aa View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2024

  1. Preparing for merge from rustc

    The Miri Cronjob Bot committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    0453d9b View commit details
    Browse the repository at this point in the history
  2. Merge from rustc

    The Miri Cronjob Bot committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    23f4eae View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f03c7b2 View commit details
    Browse the repository at this point in the history