Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/miri
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ae964207bb17911cf96d9744d9469fa2734093a8
Choose a base ref
...
head repository: rust-lang/miri
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 12dac5c0f7acd106401aa14fec758f0ff552f678
Choose a head ref
  • 15 commits
  • 17 files changed
  • 4 contributors

Commits on Mar 14, 2021

  1. Configuration menu
    Copy the full SHA
    893843f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1dec9c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c9ff02f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    15465a5 View commit details
    Browse the repository at this point in the history
  5. Auto merge of #1744 - rust-lang:bad-unwind, r=RalfJung

    ensure we catch incorrectly unwinding calls
    
    Fixes #1740
    bors committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    a798792 View commit details
    Browse the repository at this point in the history
  6. Auto merge of #1743 - RalfJung:callee-checks, r=RalfJung

    Check callee ABI when Miri calls closures
    
    Fixes #1741
    bors committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    0788188 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2021

  1. Don't duplicate check_abi()

    hyd-dev committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    1c7d747 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2021

  1. Configuration menu
    Copy the full SHA
    bbc3485 View commit details
    Browse the repository at this point in the history
  2. Revert "Don't duplicate check_abi()"

    This reverts commit 1c7d747.
    hyd-dev committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    3ee8654 View commit details
    Browse the repository at this point in the history
  3. Remove meaningless tests

    hyd-dev committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    633ac2a View commit details
    Browse the repository at this point in the history
  4. Remove the macro and expand it manually

    hyd-dev committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    7ec919d View commit details
    Browse the repository at this point in the history
  5. Auto merge of #1745 - hyd-dev:unsup-foreign-calls-are-not-ub, r=RalfJung

    Improve error message of calling unsupported non-"C"/"system"-ABI foreign function
    
    Miri currently reports the following `foo()` call has ABI-mismatch UB:
    ```rust
    #[cfg(unix)]
    extern "Rust" { // or any non-"C" ABI
        fn foo();
    }
    
    #[cfg(windows)]
    extern "C" { // or any non-"system" ABI
        fn foo();
    }
    
    fn main() {
        unsafe {
            foo();
        }
    }
    ```
    [Output when targeting Linux](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=72afc3bd4d9fdab962422cfc2c5a2166) (and maybe also macOS):
    ```
    error: Undefined Behavior: calling a function with ABI C using caller ABI Rust
      --> src/main.rs:13:9
       |
    13 |         foo();
       |         ^^^^^ calling a function with ABI C using caller ABI Rust
       |
       = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavio
    ```
    Output when targeting Windows:
    ```
    error: Undefined Behavior: calling a function with ABI system using caller ABI C
      --> <anon>:13:9
       |
    13 |         foo();
       |         ^^^^^ calling a function with ABI system using caller ABI C
       |
       = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    ```
    
    However, to my knowledge, that's not UB -- it's just unsupported by Miri (and Miri can't assume the function has `"C"` or `"system"` ABI since Miri doesn't know about it). I believe that is because of the overzealous `check_abi()` call before the long `match` in `src/shims/{posix,windows}/foreign_items.rs`. The ABI is checked to match the system one (`"system"` on Windows, `"C"` otherwise) no matter the callee is recognized as a shim or an unsupported foreign function.
    
    Therefore, this PR removes the `check_abi()` call before the `match` and inserts a `check_abi()` call to each non-wildcard match.
    bors committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    80d6b56 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4f899ce View commit details
    Browse the repository at this point in the history
  7. rustup

    RalfJung committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    fc88c6c View commit details
    Browse the repository at this point in the history
  8. Auto merge of #1746 - bstrie:depfix, r=RalfJung

    Replace deprecated `collections::Bound` with `ops::Bound`
    
    Cc rust-lang/rust#83242 , which resulted from rust-lang/rust#82122 .
    bors committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    12dac5c View commit details
    Browse the repository at this point in the history
Loading