]>
git.lizzy.rs Git - rust.git/log
bors [Tue, 23 Mar 2021 09:08:26 +0000 (09:08 +0000)]
Auto merge of #1750 - hyd-dev:rustup, r=RalfJung
Remove `#![feature(or_patterns)]`
Fix a warning on CI: https://github.com/rust-lang/miri/runs/
2173037929 #step:8:59
hyd-dev [Tue, 23 Mar 2021 08:55:46 +0000 (16:55 +0800)]
Update `rust-version`
hyd-dev [Tue, 23 Mar 2021 08:41:53 +0000 (16:41 +0800)]
Remove `#![feature(or_patterns)]`
bors [Mon, 22 Mar 2021 11:37:52 +0000 (11:37 +0000)]
Auto merge of #1749 - RalfJung:rustup, r=RalfJung
rustup; better comment in storage_dead_dangling test
Ralf Jung [Mon, 22 Mar 2021 11:35:30 +0000 (12:35 +0100)]
rustup; better comment in storage_dead_dangling test
bors [Wed, 17 Mar 2021 23:20:59 +0000 (23:20 +0000)]
Auto merge of #1746 - bstrie:depfix, r=RalfJung
Replace deprecated `collections::Bound` with `ops::Bound`
Cc https://github.com/rust-lang/rust/issues/83242 , which resulted from https://github.com/rust-lang/rust/pull/82122 .
Ralf Jung [Wed, 17 Mar 2021 23:19:53 +0000 (00:19 +0100)]
rustup
bstrie [Wed, 17 Mar 2021 22:34:44 +0000 (18:34 -0400)]
Replace deprecated `collections::Bound`
bors [Wed, 17 Mar 2021 17:47:51 +0000 (17:47 +0000)]
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.
hyd-dev [Wed, 17 Mar 2021 14:12:08 +0000 (22:12 +0800)]
Remove the macro and expand it manually
hyd-dev [Wed, 17 Mar 2021 13:55:45 +0000 (21:55 +0800)]
Remove meaningless tests
hyd-dev [Wed, 17 Mar 2021 13:51:07 +0000 (21:51 +0800)]
Revert "Don't duplicate `check_abi()`"
This reverts commit
1c7d7471dae217810f48e594baca2e143a38da10 .
hyd-dev [Tue, 16 Mar 2021 20:21:17 +0000 (04:21 +0800)]
Unsupported foreign non-"C"/"system"-ABI function calls are not UB
hyd-dev [Tue, 16 Mar 2021 16:40:53 +0000 (00:40 +0800)]
Don't duplicate `check_abi()`
bors [Sun, 14 Mar 2021 18:05:18 +0000 (18:05 +0000)]
Auto merge of #1743 - RalfJung:callee-checks, r=RalfJung
Check callee ABI when Miri calls closures
Fixes https://github.com/rust-lang/miri/issues/1741
bors [Sun, 14 Mar 2021 16:11:21 +0000 (16:11 +0000)]
Auto merge of #1744 - rust-lang:bad-unwind, r=RalfJung
ensure we catch incorrectly unwinding calls
Fixes https://github.com/rust-lang/miri/issues/1740
Ralf Jung [Sun, 14 Mar 2021 16:10:45 +0000 (17:10 +0100)]
don't ICE when we unwind despite panic=abort
Ralf Jung [Sun, 14 Mar 2021 16:03:20 +0000 (17:03 +0100)]
ensure we catch incorrectly unwinding calls
Ralf Jung [Sun, 14 Mar 2021 14:38:22 +0000 (15:38 +0100)]
don't ICE when callee has the wrong number of arguments
Ralf Jung [Sun, 14 Mar 2021 14:30:37 +0000 (15:30 +0100)]
when Miri calls a function ptr, make sure it has the right ABI
bors [Thu, 11 Mar 2021 08:07:36 +0000 (08:07 +0000)]
Auto merge of #1739 - RalfJung:rustup, r=RalfJung
rustup
Ralf Jung [Thu, 11 Mar 2021 08:07:05 +0000 (09:07 +0100)]
rustup
bors [Wed, 10 Mar 2021 15:00:43 +0000 (15:00 +0000)]
Auto merge of #1738 - RalfJung:rustup, r=RalfJung
rustup
The error message is not entirely right now, but close enough... let's get CI to pass before we miss other breakage.
Ralf Jung [Wed, 10 Mar 2021 14:21:12 +0000 (15:21 +0100)]
rustup
bors [Tue, 9 Mar 2021 18:38:22 +0000 (18:38 +0000)]
Auto merge of #1736 - DJMcNab:rust-analyzer-private, r=RalfJung
Opt-in to rustc_private for `rust-analyzer`
rust-analyzer/rust-analyzer#7891
Daniel McNab [Tue, 9 Mar 2021 18:27:22 +0000 (18:27 +0000)]
Add link to pr for documentation
bors [Tue, 9 Mar 2021 13:51:10 +0000 (13:51 +0000)]
Auto merge of #1737 - rust-lang:oli-obk-patch-1, r=oli-obk
mir-opt-level 4 is the new 3
cc https://github.com/rust-lang/rust/pull/82736
Oli Scherer [Tue, 9 Mar 2021 13:50:38 +0000 (14:50 +0100)]
mir-opt-level 4 is the new 3
bors [Mon, 8 Mar 2021 18:06:30 +0000 (18:06 +0000)]
Auto merge of #1735 - m-ou-se:remove-unwrap-none, r=RalfJung
Remove unwrap_none/expect_none, take 2.
This is https://github.com/rust-lang/miri/pull/1734, but now with a better alternative.
This also upgrades rustc to the latest version, to be able to use the better alternative (`try_insert`).
Daniel McNab [Mon, 8 Mar 2021 17:28:52 +0000 (17:28 +0000)]
Opt-in to rustc_private for `rust-analyzer`
rust-analyzer/rust-analyzer#7891
Mara Bos [Mon, 8 Mar 2021 16:06:50 +0000 (17:06 +0100)]
Fix panic test.
Mara Bos [Mon, 8 Mar 2021 15:57:09 +0000 (16:57 +0100)]
Remove unwrap_none as it won't be stabilized.
This upgrades to the latest rustc to be able to use try_insert()
instead.
bors [Fri, 5 Mar 2021 12:29:32 +0000 (12:29 +0000)]
Auto merge of #1733 - Smittyvb:breakpoint-intrinsic, r=RalfJung
Support breakpoint intrinsic
The `breakpoint` intrinsic raises a `SIGTRAP` signal. If a debugger is attached to a normal program, then `SIGTRAP` can be used to trigger breakpoints in debuggers like `gdb`. If there is no debugger, then the program exits with a message like `Trace/breakpoint trap (core dumped)`. This adds support for the intrinsic in Miri. While actually passing through the `SIGTRAP` doesn't make sense in a Miri context (if it just raised the signal normally then it would allow for debugging Miri itself, not the program being evaluated). As such, it just raises an error.
Smittyvb [Fri, 5 Mar 2021 12:16:50 +0000 (07:16 -0500)]
Check arg count
Co-authored-by: Ralf Jung <post@ralfj.de>
Smitty [Thu, 4 Mar 2021 12:48:28 +0000 (07:48 -0500)]
Support breakpoint intrinsic
bors [Wed, 3 Mar 2021 08:06:15 +0000 (08:06 +0000)]
Auto merge of #1732 - RalfJung:atomic_op, r=RalfJung
rename atomic_op_min_max -> atomic_op
The corresponding enum is called `AtomicOp` so IMO this also makes more sense as the name for the function.
Ralf Jung [Tue, 2 Mar 2021 18:54:45 +0000 (19:54 +0100)]
rename atomic_op_min_max -> atomic_op
bors [Tue, 2 Mar 2021 14:52:32 +0000 (14:52 +0000)]
Auto merge of #1721 - henryboisdequin:add-atomic-min-and-max, r=oli-obk
Add atomic min and max
Closes #1718
Previous attempt: #1653
TODO:
- [x] Merge `atomic_op` and `atomic_min_max` functions
- [x] Fix CI
**Note:** this PR also removes arbitrary trailing whitespace and generally formats the affected files
Henry Boisdequin [Tue, 2 Mar 2021 12:40:27 +0000 (18:10 +0530)]
Add in `atomic_{min,max}_x` intrinsics
Co-authored-by: Greg Bowyer <gbowyer@fastmail.co.uk>
Henry Boisdequin [Tue, 2 Mar 2021 12:36:12 +0000 (18:06 +0530)]
fmt data_race.rs and intrinsics.rs
bors [Tue, 2 Mar 2021 11:08:27 +0000 (11:08 +0000)]
Auto merge of #1730 - RalfJung:zulip, r=oli-obk
add date to Zulip notification subject
We sometimes have discussions in those threads; let's make sure we have a new thread for each new day (which likely means a new problem... or nobody got around to fixing things yet^^).
bors [Tue, 2 Mar 2021 10:51:12 +0000 (10:51 +0000)]
Auto merge of #1731 - RalfJung:ci, r=oli-obk
adjust CI test flags
`RUST_TEST_NOCAPTURE` seems to make no difference except for making compiletest output not use colors any more; `RUST_BACKTRACE` is already set by `compiletest.rs`.
Ralf Jung [Tue, 2 Mar 2021 10:24:56 +0000 (11:24 +0100)]
adjust CI test flags
bors [Tue, 2 Mar 2021 10:11:02 +0000 (10:11 +0000)]
Auto merge of #1729 - RalfJung:rustup, r=RalfJung
rustup; fix tests for new MIR optimization
Somehow https://github.com/rust-lang/rust/pull/78360 manages to mask UB. This would make sense if there were loops or things like that, but there are not, so really this is just very confusing...
Ralf Jung [Tue, 2 Mar 2021 10:09:06 +0000 (11:09 +0100)]
add date to Zulip notification subject
Ralf Jung [Tue, 2 Mar 2021 10:04:35 +0000 (11:04 +0100)]
make optimized-test-run a bit more like what cargo does
Ralf Jung [Tue, 2 Mar 2021 09:44:06 +0000 (10:44 +0100)]
rustup; fix tests for new MIR optimization
bors [Tue, 2 Mar 2021 09:18:13 +0000 (09:18 +0000)]
Auto merge of #1728 - RalfJung:rustup, r=RalfJung
rustup
Let's see if that version still all works
Ralf Jung [Tue, 2 Mar 2021 09:16:44 +0000 (10:16 +0100)]
rustup
bors [Sun, 28 Feb 2021 10:35:54 +0000 (10:35 +0000)]
Auto merge of #1726 - hyd-dev:stub-d, r=RalfJung
cargo-miri: create stub .d files
Thanks `@RalfJung` for the discovery: https://github.com/rust-lang/miri/issues/1724#issuecomment-
787115693 :heart:
Fixes #1724.
hyd-dev [Sun, 28 Feb 2021 10:13:17 +0000 (18:13 +0800)]
Cleanup test-cargo-miri/run-test.py
hyd-dev [Sun, 28 Feb 2021 08:10:35 +0000 (16:10 +0800)]
Drop MIRIFLAGS from "no rebuild" test
hyd-dev [Sun, 28 Feb 2021 07:57:49 +0000 (15:57 +0800)]
Clarify that the "dep-info" is fake and add a newline
hyd-dev [Sat, 27 Feb 2021 20:52:27 +0000 (04:52 +0800)]
Create stub .d files
bors [Sat, 27 Feb 2021 19:11:05 +0000 (19:11 +0000)]
Auto merge of #1725 - RalfJung:zst-reborrow, r=RalfJung
fix reborrowing of tagged ZST references
`@SkiFire13` [pointed out](https://github.com/rust-lang/rust/pull/82554#issuecomment-
787088712 ) that Miri fails to detect illegal use of empty slices. This PR fixes that. In so doing, it uncovers a flaw of Stacked Borrows: it is incompatible with how the formatting machinery uses `extern type`, so for now we skip reborrowing when we cannot determine the exact size of the pointee.
Ralf Jung [Sat, 27 Feb 2021 19:03:51 +0000 (20:03 +0100)]
fix reborrowing of tagged ZST references
bors [Sat, 27 Feb 2021 12:08:05 +0000 (12:08 +0000)]
Auto merge of #1723 - RalfJung:cargo-miri, r=RalfJung
cargo-miri: avoid unnecessary rebuilds
Fixes https://github.com/rust-lang/miri/issues/1722
Ralf Jung [Sat, 27 Feb 2021 11:32:06 +0000 (12:32 +0100)]
create more fake files for cdylibs and staticlibs
Ralf Jung [Sat, 27 Feb 2021 11:24:58 +0000 (12:24 +0100)]
test for unnecessary rebuilds in 'cargo miri run'
bors [Tue, 23 Feb 2021 08:24:35 +0000 (08:24 +0000)]
Auto merge of #1720 - RalfJung:rustup, r=RalfJung
rustup
Prevent MIR optimizations from removing this read.
Ralf Jung [Tue, 23 Feb 2021 08:23:49 +0000 (09:23 +0100)]
rustup
bors [Sat, 20 Feb 2021 17:35:48 +0000 (17:35 +0000)]
Auto merge of #1716 - tmiasko:rustup, r=RalfJung
rustup to
e7c23ab933ebc1f205c3b59f4ebc85d40f67d404
Tomasz Miąsko [Sat, 20 Feb 2021 00:00:00 +0000 (00:00 +0000)]
bors [Thu, 18 Feb 2021 09:35:06 +0000 (09:35 +0000)]
Auto merge of #1715 - RalfJung:rustup, r=RalfJung
rustup
Ralf Jung [Thu, 18 Feb 2021 09:34:32 +0000 (10:34 +0100)]
rustup
bors [Wed, 17 Feb 2021 08:47:09 +0000 (08:47 +0000)]
Auto merge of #1714 - RalfJung:rustup, r=RalfJung
rustup
Fixes https://github.com/rust-lang/miri/issues/1711
Ralf Jung [Wed, 17 Feb 2021 08:37:21 +0000 (09:37 +0100)]
rustup
bors [Tue, 16 Feb 2021 09:18:57 +0000 (09:18 +0000)]
Auto merge of #1712 - RalfJung:rustup, r=RalfJung
Rustup
Fixes https://github.com/rust-lang/miri/issues/1706
Cc https://github.com/rust-lang/miri/issues/1711 for the temporarily disabled tests
Ralf Jung [Tue, 16 Feb 2021 08:55:44 +0000 (09:55 +0100)]
add test by @eddyb
Ralf Jung [Tue, 16 Feb 2021 08:51:53 +0000 (09:51 +0100)]
rustup and temporarily disable broken tests
bors [Mon, 15 Feb 2021 14:01:18 +0000 (14:01 +0000)]
Auto merge of #1710 - hyd-dev:crate-types, r=RalfJung
Patch `--extern` arguments in `phase_cargo_rustc` as well
Fixes #1705.
hyd-dev [Sun, 14 Feb 2021 15:33:24 +0000 (23:33 +0800)]
Add a `cdylib`-only crate test
hyd-dev [Sun, 14 Feb 2021 14:38:56 +0000 (22:38 +0800)]
Use the `issue-1567` dependency in the test
hyd-dev [Sun, 14 Feb 2021 13:57:31 +0000 (21:57 +0800)]
Stop skipping `cdylib`
hyd-dev [Sun, 14 Feb 2021 10:12:33 +0000 (18:12 +0800)]
Patch `--extern` arguments in `phase_cargo_rustc` as well
hyd-dev [Sun, 14 Feb 2021 16:52:18 +0000 (00:52 +0800)]
Extract `--extern` filenames patching code to `forward_patched_extern_arg()`
Co-authored-by: Tristan Dannenberg <dtristan@hotmail.de>
bors [Sun, 14 Feb 2021 12:29:15 +0000 (12:29 +0000)]
Auto merge of #1709 - hyd-dev:rlib, r=RalfJung
[cargo-miri] Don't skip `rlib` crates
Fixes #1691.
hyd-dev [Sun, 14 Feb 2021 11:09:22 +0000 (19:09 +0800)]
Revert the lock file version change
hyd-dev [Sun, 14 Feb 2021 11:08:47 +0000 (19:08 +0800)]
Make the test more consistent with other tests
hyd-dev [Sat, 13 Feb 2021 18:02:21 +0000 (02:02 +0800)]
[cargo-miri] Don't skip `rlib` crates
bors [Sat, 13 Feb 2021 18:41:44 +0000 (18:41 +0000)]
Auto merge of #1708 - RalfJung:issue-1567-test, r=RalfJung
add regression test for #1567
Adds a regression test for #1567.
Ralf Jung [Sat, 13 Feb 2021 18:39:03 +0000 (19:39 +0100)]
add regression test for #1567
bors [Tue, 9 Feb 2021 09:18:22 +0000 (09:18 +0000)]
Auto merge of #1703 - calebzulawski:master, r=RalfJung
Remove non-power-of-two SIMD vectors
Closes https://github.com/rust-lang/rust/issues/81868.
Caleb Zulawski [Tue, 9 Feb 2021 04:11:33 +0000 (23:11 -0500)]
Update rust-version
Caleb Zulawski [Mon, 8 Feb 2021 05:16:22 +0000 (00:16 -0500)]
Remove non-power-of-two SIMD vectors
bors [Fri, 5 Feb 2021 09:59:15 +0000 (09:59 +0000)]
Auto merge of #1701 - m-ou-se:non-fmt-panic-lint, r=oli-obk
Update rust version and update tests.
This is a fix for https://github.com/rust-lang/rust/issues/81770
Mara Bos [Fri, 5 Feb 2021 09:02:47 +0000 (10:02 +0100)]
Update rust version.
- Allow new non_fmt_panic lint in test.
- Remove stabilized feature(wake_trait).
bors [Wed, 3 Feb 2021 22:38:19 +0000 (22:38 +0000)]
Auto merge of #1700 - RalfJung:rustup, r=RalfJung
rustup
Cc https://github.com/rust-lang/rust/issues/81726
Ralf Jung [Wed, 3 Feb 2021 22:37:40 +0000 (23:37 +0100)]
rustup
bors [Tue, 2 Feb 2021 21:57:26 +0000 (21:57 +0000)]
Auto merge of #1699 - m-ou-se:panic-format, r=RalfJung
Remove unnecessary `format!()` in `panic!()`.
`panic!(format!(..))` will start giving a warning [soon](https://github.com/rust-lang/rust/pull/81645).
Mara Bos [Tue, 2 Feb 2021 20:40:30 +0000 (21:40 +0100)]
Remove unnecessary `format!()` in `panic!()`.
bors [Sun, 31 Jan 2021 13:25:37 +0000 (13:25 +0000)]
Auto merge of #1698 - RalfJung:rustup, r=RalfJung
rustup; remove some no-longer-needed Windows shims
libstd now calls these lock functions directly, and `GetModuleHandleW` isn't use either any more since https://github.com/rust-lang/rust/pull/81478.
Ralf Jung [Sun, 31 Jan 2021 13:23:49 +0000 (14:23 +0100)]
rustup; remove some no-longer-needed Windows shims
bors [Sun, 31 Jan 2021 12:16:31 +0000 (12:16 +0000)]
Auto merge of #1697 - RalfJung:rustup, r=RalfJung
rustup
Cc https://github.com/rust-lang/rust/issues/81551
Ralf Jung [Sun, 31 Jan 2021 12:12:25 +0000 (13:12 +0100)]
rustup
bors [Sat, 30 Jan 2021 20:17:39 +0000 (20:17 +0000)]
Auto merge of #1693 - rust-lang:oli-obk-patch-1, r=RalfJung
Document -Zmiri-compare-exchange-weak-failure-rate
Oli Scherer [Sat, 30 Jan 2021 19:06:05 +0000 (20:06 +0100)]
Update README.md
Oli Scherer [Sat, 30 Jan 2021 19:05:21 +0000 (20:05 +0100)]
Update README.md
Co-authored-by: Ralf Jung <post@ralfj.de>
bors [Fri, 29 Jan 2021 20:16:49 +0000 (20:16 +0000)]
Auto merge of #1696 - RalfJung:abi-check, r=RalfJung
add test for caller ABI check
Ralf Jung [Fri, 29 Jan 2021 20:16:17 +0000 (21:16 +0100)]
add test for caller ABI check