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

Rollup of 6 pull requests #122953

Closed
wants to merge 58 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 30 commits March 12, 2024 17:26
fix Zulip topic for PR-creation message
add exposed-provenance example where we miss UB

Example by `@saethlin`
make 'invalidate' benchmark shorter

This is currently by far the slowest benchmark in our suite, taking >9s, when the second slowest takes 2.7s. So let's speed this up to 2.3s, making it still the second-slowest in the benchmark suite.

`@saethlin` any objections? Also, why is this called "invalidate"? It got added in rust-lang/miri#3083 but I can't figure out the point of that name even after looking at the PR.^^ There should be a comment in the benchmark explaining what it is testing.
remove duplicate test

This is basically the same as `tests/pass/imported_main.rs`.
this fixes compile_fail doctests with post-mono errors
fix compile_fail doctests with post-mono errors

Fixes rust-lang/miri#2423
The instrinsic is compiled to a `pause` instruction, which behaves like a no-op when SSE2 is not available.

https://www.felixcloutier.com/x86/pause.html
…lfJung

Allow `llvm.x86.sse2.pause` instrinsic to be called without SSE2

The instrinsic is compiled to a `pause` instruction, which behaves like a no-op when SSE2 is not available.

https://www.felixcloutier.com/x86/pause.html
matthiaskrgr and others added 13 commits March 23, 2024 12:38
Report retags as distinct from real memory accesses for data races

This changes the error reporting for data races such that reference invariants are no longer reported as real read and writes.

Before:
```
Data race detected between (1) non-atomic write on thread `unnamed-6` and (2) non-atomic read on thread `unnamed-5` at alloc1034971+0x10c. (2) just happened here
```

After:
```
Data race detected between (1) non-atomic write on thread `unnamed-8` and (2) shared reference invariant on thread `unnamed-6` at alloc1018329+0x190. (2) just happened here
```

Non-atomic read accesses from the *other* thread don't have this information tracked so those are called `some potential non-atomic read access` here.
transmute: caution against int2ptr transmutation

This came up in rust-lang#121282.
Cc `@saethlin` `@scottmcm`

Eventually we'll add a proper description of provenance that we can reference, but that's a bunch of work and it's unclear who will have the time to do that when. Meanwhile, let's at least do what we can without mentioning provenance explicitly.
…r=lcnr

Uniquify `ReError` on input mode in canonicalizer

See test descr

Fixes rust-lang#122861

r? lcnr
Add test in higher ranked subtype

I'm a beginner in this repository, and there are some things I'm not sure about:

- Is it okay that there is a warning:
```
rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit) }
```
- Is it okay that there are two duplicate errors in the same line?
- Did I put the test in the right place?

Any suggestions would be appreciated.

Fixes rust-lang#121649
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 23, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Mar 23, 2024

📌 Commit 70b2185 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2024
@bors
Copy link
Contributor

bors commented Mar 23, 2024

⌛ Testing commit 70b2185 with merge 2606815...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 23, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#122379 (transmute: caution against int2ptr transmutation)
 - rust-lang#122895 (add some ice tests 5xxxx to 9xxxx)
 - rust-lang#122907 (Uniquify `ReError` on input mode in canonicalizer)
 - rust-lang#122942 (Add test in higher ranked subtype)
 - rust-lang#122943 (add a couple more ice tests)
 - rust-lang#122952 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [ui] tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs stdout ----
diff of stderr:

- warning: `extern` fn uses type `[i8]`, which is not FFI-safe
+ warning: `extern` fn uses type `[u8]`, which is not FFI-safe
2   --> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:4:12
4 LL | type Foo = extern "C" fn(::std::ffi::CStr);


8    = note: slices have no C equivalent
9    = note: `#[warn(improper_ctypes_definitions)]` on by default
10 
- warning: `extern` block uses type `[i8]`, which is not FFI-safe
+ warning: `extern` block uses type `[u8]`, which is not FFI-safe
12   --> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:7:18
13    |
14 LL |     fn meh(blah: Foo);

The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/extern/extern-C-non-FFI-safe-arg-ice-52334/extern-C-non-FFI-safe-arg-ice-52334.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args extern/extern-C-non-FFI-safe-arg-ice-52334.rs`
error: 1 errors occurred comparing output.
status: exit status: 0
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/extern/extern-C-non-FFI-safe-arg-ice-52334" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/extern/extern-C-non-FFI-safe-arg-ice-52334/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
warning: `extern` fn uses type `[u8]`, which is not FFI-safe
##[warning]  --> /checkout/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs:4:12
LL | type Foo = extern "C" fn(::std::ffi::CStr);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
   |
   = help: consider using a raw pointer instead
   = help: consider using a raw pointer instead
   = note: slices have no C equivalent
   = note: `#[warn(improper_ctypes_definitions)]` on by default

warning: `extern` block uses type `[u8]`, which is not FFI-safe
##[warning]  --> /checkout/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs:7:18
   |
LL |     fn meh(blah: Foo);
   |                  ^^^ not FFI-safe
   = help: consider using a raw pointer instead
   = help: consider using a raw pointer instead
   = note: slices have no C equivalent
   = note: `#[warn(improper_ctypes)]` on by default
warning: 2 warnings emitted
------------------------------------------


@bors
Copy link
Contributor

bors commented Mar 23, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 23, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-rioxw1r branch September 1, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants