]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAuto merge of #2183 - RalfJung:better-provenance-control, r=RalfJung
bors [Mon, 6 Jun 2022 16:57:34 +0000 (16:57 +0000)]
Auto merge of #2183 - RalfJung:better-provenance-control, r=RalfJung

adjust for better provenance control

This is the Miri side of https://github.com/rust-lang/rust/pull/97684.

2 years agomake output bitwidth-independent
Ralf Jung [Mon, 6 Jun 2022 16:33:48 +0000 (12:33 -0400)]
make output bitwidth-independent

2 years agoAuto merge of #2202 - InfRandomness:infrandomness/rustdoc-fixes, r=RalfJung
bors [Mon, 6 Jun 2022 16:32:05 +0000 (16:32 +0000)]
Auto merge of #2202 - InfRandomness:infrandomness/rustdoc-fixes, r=RalfJung

Fix rustdoc warnings

This fixes the rustdoc warnings presented by the tool

2 years agoFix rustdoc warnings
infrandomness [Mon, 6 Jun 2022 16:17:38 +0000 (18:17 +0200)]
Fix rustdoc warnings

2 years agorustup
Ralf Jung [Mon, 6 Jun 2022 16:10:40 +0000 (12:10 -0400)]
rustup

2 years agoport some tests away from flags we want to remove
Ralf Jung [Mon, 6 Jun 2022 15:44:36 +0000 (11:44 -0400)]
port some tests away from flags we want to remove

2 years agofix rustup-toolchain without arguments
Ralf Jung [Mon, 6 Jun 2022 15:44:27 +0000 (11:44 -0400)]
fix rustup-toolchain without arguments

2 years agoaddr no longer exposes :)
Ralf Jung [Fri, 3 Jun 2022 12:47:00 +0000 (08:47 -0400)]
addr no longer exposes :)

2 years agoadjust for better provenance control
Ralf Jung [Fri, 3 Jun 2022 12:46:22 +0000 (08:46 -0400)]
adjust for better provenance control

2 years agoAuto merge of #2201 - RalfJung:arg-parsing, r=RalfJung
bors [Mon, 6 Jun 2022 15:09:47 +0000 (15:09 +0000)]
Auto merge of #2201 - RalfJung:arg-parsing, r=RalfJung

argument parsing: make better use of strip_prefix

This gets rid of lots of `unwrap`. :)

2 years agoargument parsing: make better use of strip_prefix
Ralf Jung [Mon, 6 Jun 2022 15:07:25 +0000 (11:07 -0400)]
argument parsing: make better use of strip_prefix

2 years agoAuto merge of #2198 - InfRandomness:UNIX-refactor, r=RalfJung
bors [Mon, 6 Jun 2022 12:45:32 +0000 (12:45 +0000)]
Auto merge of #2198 - InfRandomness:UNIX-refactor, r=RalfJung

Refactor POSIX to UNIX

This renames the directories containing posix to unix; where applicable,
it also rename functions with the word "posix" to "unix"

Fixes https://github.com/rust-lang/miri/issues/2012

2 years agoRefactor POSIX to UNIX
infrandomness [Sun, 5 Jun 2022 20:29:30 +0000 (22:29 +0200)]
Refactor POSIX to UNIX

This renames the directory containing posix to unix; where applicable,
it also rename functions with the word "posix" to "unix"

2 years agoAuto merge of #2197 - RalfJung:round-robin, r=RalfJung
bors [Sun, 5 Jun 2022 18:37:07 +0000 (18:37 +0000)]
Auto merge of #2197 - RalfJung:round-robin, r=RalfJung

make Miri's scheduler proper round-robin

When thread N blocks or yields, we activate thread N+1 next, rather than always activating thread 0. This should guarantee that as long as all threads regularly yield, each thread eventually takes a step again.

Fixes the "multiple loops that yield playing ping-pong" part of https://github.com/rust-lang/miri/issues/1388.
`@cbeuw` I hope this doesn't screw up the scheduler-dependent tests you are adding in your PR.

2 years agomore spin-loop-tests
Ralf Jung [Sun, 5 Jun 2022 18:31:44 +0000 (14:31 -0400)]
more spin-loop-tests

2 years agomake Miri's scheduler proper round-robin
Ralf Jung [Sun, 5 Jun 2022 18:20:22 +0000 (14:20 -0400)]
make Miri's scheduler proper round-robin

2 years agoAuto merge of #2194 - RalfJung:race, r=RalfJung
bors [Sun, 5 Jun 2022 16:38:53 +0000 (16:38 +0000)]
Auto merge of #2194 - RalfJung:race, r=RalfJung

add interesting data race test

This interesting testcase came up in https://github.com/rust-lang/miri/issues/2192.

2 years agoadd interesting data race test
Ralf Jung [Sun, 5 Jun 2022 16:14:57 +0000 (12:14 -0400)]
add interesting data race test

2 years agoAuto merge of #2193 - RalfJung:strict, r=RalfJung
bors [Sun, 5 Jun 2022 15:49:55 +0000 (15:49 +0000)]
Auto merge of #2193 - RalfJung:strict, r=RalfJung

do not use int2ptr casts in strict provenance tests

2 years agodo not use int2ptr casts in strict provenance tests
Ralf Jung [Sun, 5 Jun 2022 15:47:39 +0000 (11:47 -0400)]
do not use int2ptr casts in strict provenance tests

2 years agoAuto merge of #2189 - RalfJung:clippy, r=RalfJung
bors [Sun, 5 Jun 2022 15:18:39 +0000 (15:18 +0000)]
Auto merge of #2189 - RalfJung:clippy, r=RalfJung

run Clippy on CI

and fix some things it complains about. Also use `rustup-toolchain` script on CI (reduces code duplication, and good thing to make sure it keeps working, since we recommend it in the docs).

I left `ui_test` out for now; I'll leave those nits to `@oli-obk.` ;)

2 years agoAuto merge of #2190 - RalfJung:rustup, r=RalfJung
bors [Sat, 4 Jun 2022 23:44:29 +0000 (23:44 +0000)]
Auto merge of #2190 - RalfJung:rustup, r=RalfJung

rustup

Cc https://github.com/rust-lang/rust/issues/97745

2 years agorustup
Ralf Jung [Sat, 4 Jun 2022 23:43:46 +0000 (19:43 -0400)]
rustup

2 years agoclippy: cargo-miri
Ralf Jung [Sat, 4 Jun 2022 16:11:23 +0000 (12:11 -0400)]
clippy: cargo-miri

2 years agoclippy: main crate
Ralf Jung [Sat, 4 Jun 2022 15:55:36 +0000 (11:55 -0400)]
clippy: main crate

2 years agorun clippy on CI
Ralf Jung [Sat, 4 Jun 2022 15:48:46 +0000 (11:48 -0400)]
run clippy on CI

2 years agoAuto merge of #2186 - matthiaskrgr:clippy, r=RalfJung
bors [Sat, 4 Jun 2022 15:17:17 +0000 (15:17 +0000)]
Auto merge of #2186 - matthiaskrgr:clippy, r=RalfJung

clippy fixes

clippy::redundant_closure
clippy::unnecessary_mut_passed
clippy::single_char_pattern
clippy::clone_on_copy
clippy::into_iter_on_ref
clippy::extra_unused_lifetimes

2 years agoclippy fixes
Matthias Krüger [Sat, 4 Jun 2022 11:40:54 +0000 (13:40 +0200)]
clippy fixes

clippy::redundant_closure
clippy::unnecessary_mut_passed
clippy::single_char_pattern
clippy::clone_on_copy
clippy::into_iter_on_ref
clippy::extra_unused_lifetimes

2 years agoAuto merge of #2184 - RalfJung:readme, r=RalfJung
bors [Fri, 3 Jun 2022 18:49:13 +0000 (18:49 +0000)]
Auto merge of #2184 - RalfJung:readme, r=RalfJung

fix dangling reference in the README

2 years agofix dangling reference in the README
Ralf Jung [Fri, 3 Jun 2022 18:48:45 +0000 (14:48 -0400)]
fix dangling reference in the README

2 years agoAuto merge of #2180 - RalfJung:stale, r=RalfJung
bors [Fri, 3 Jun 2022 12:10:32 +0000 (12:10 +0000)]
Auto merge of #2180 - RalfJung:stale, r=RalfJung

delete stale stderr files

`@oli-obk` can we do anything to detect them? Not sure if compiletest does anything smart here.

2 years agodelete stale stderr files
Ralf Jung [Fri, 3 Jun 2022 11:36:05 +0000 (07:36 -0400)]
delete stale stderr files

2 years agoAuto merge of #2178 - RalfJung:double-ref, r=RalfJung
bors [Thu, 2 Jun 2022 19:11:46 +0000 (19:11 +0000)]
Auto merge of #2178 - RalfJung:double-ref, r=RalfJung

do not pass TyCtxt by reference

2 years agodo not pass TyCtxt by reference
Ralf Jung [Thu, 2 Jun 2022 19:11:22 +0000 (15:11 -0400)]
do not pass TyCtxt by reference

2 years agoAuto merge of #2177 - DrMeepster:global_allocator_backtrace_test, r=RalfJung
bors [Thu, 2 Jun 2022 11:37:11 +0000 (11:37 +0000)]
Auto merge of #2177 - DrMeepster:global_allocator_backtrace_test, r=RalfJung

add test for backtrace with global allocator

closes #1996

2 years agoadd test for backtrace with global allocator
DrMeepster [Thu, 2 Jun 2022 00:32:01 +0000 (17:32 -0700)]
add test for backtrace with global allocator

2 years agoAuto merge of #2176 - RalfJung:test-dirs, r=oli-obk
bors [Wed, 1 Jun 2022 15:41:11 +0000 (15:41 +0000)]
Auto merge of #2176 - RalfJung:test-dirs, r=oli-obk

rename test suite directories

Fixes https://github.com/rust-lang/miri/issues/2154

2 years agorename test suite directories
Ralf Jung [Wed, 1 Jun 2022 14:53:38 +0000 (10:53 -0400)]
rename test suite directories

2 years agoAuto merge of #2174 - RalfJung:summary, r=oli-obk
bors [Wed, 1 Jun 2022 13:01:22 +0000 (13:01 +0000)]
Auto merge of #2174 - RalfJung:summary, r=oli-obk

print list of failed tests in summary

compiletest does this and it is quite useful; see e.g. [here](https://github.com/rust-lang/rust/runs/6473917188?check_suite_focus=true). Example output:

![image](https://user-images.githubusercontent.com/330628/171382085-21674f46-9db4-49ef-9c52-2be06b307e28.png)

2 years agoprint list of failed tests in summary
Ralf Jung [Wed, 1 Jun 2022 10:14:59 +0000 (06:14 -0400)]
print list of failed tests in summary

2 years agoAuto merge of #2175 - RalfJung:xargo, r=oli-obk
bors [Wed, 1 Jun 2022 12:39:28 +0000 (12:39 +0000)]
Auto merge of #2175 - RalfJung:xargo, r=oli-obk

bump Xargo

Also use that as a clue to refresh our CI caches.

Fixes https://github.com/rust-lang/miri/issues/705

2 years agoAuto merge of #2167 - rust-lang:gesundheit, r=RalfJung
bors [Wed, 1 Jun 2022 11:48:12 +0000 (11:48 +0000)]
Auto merge of #2167 - rust-lang:gesundheit, r=RalfJung

Check that diagnostics happen in the line that they are annotated for

fixes #2131

2 years agoCheck that diagnostics happen in the line that they are annotated for
Oli Scherer [Mon, 30 May 2022 12:17:36 +0000 (12:17 +0000)]
Check that diagnostics happen in the line that they are annotated for

2 years agoadvanced GHA
Ralf Jung [Wed, 1 Jun 2022 10:45:09 +0000 (06:45 -0400)]
advanced GHA

2 years agofmt
Ralf Jung [Wed, 1 Jun 2022 10:42:11 +0000 (06:42 -0400)]
fmt

2 years agoalso avoid rebuilding cached RTIM
Ralf Jung [Wed, 1 Jun 2022 10:31:08 +0000 (06:31 -0400)]
also avoid rebuilding cached RTIM

2 years agobump xargo version, and tweak xargo caching
Ralf Jung [Wed, 1 Jun 2022 10:28:27 +0000 (06:28 -0400)]
bump xargo version, and tweak xargo caching

2 years agoAuto merge of #2173 - RalfJung:rustlib, r=oli-obk
bors [Wed, 1 Jun 2022 07:22:31 +0000 (07:22 +0000)]
Auto merge of #2173 - RalfJung:rustlib, r=oli-obk

different strategy for normalizing Rust stdlib path

`-Zremap-cwd-prefix` has some [unintended side-effects](https://github.com/rust-lang/miri/issues/2172), so we could use regexp-based normalization instead. Unfortunately, this will fail if the user's home directory contains a space.

Fixes https://github.com/rust-lang/miri/issues/2172

2 years agopaper over platform differences
Ralf Jung [Tue, 31 May 2022 23:00:14 +0000 (19:00 -0400)]
paper over platform differences

2 years agodifferent strategy for normalizing Rust stdlib path
Ralf Jung [Tue, 31 May 2022 22:23:47 +0000 (18:23 -0400)]
different strategy for normalizing Rust stdlib path

2 years agoAuto merge of #2171 - RalfJung:less-dup, r=RalfJung
bors [Tue, 31 May 2022 14:37:52 +0000 (14:37 +0000)]
Auto merge of #2171 - RalfJung:less-dup, r=RalfJung

reduce some code duplication

`@saethlin` this is what I meant. I had to fiddle a bit to make the lifetimes work, but now it passes rustc. :)

2 years agofix some lifetime names
Ralf Jung [Tue, 31 May 2022 12:44:48 +0000 (08:44 -0400)]
fix some lifetime names

2 years agoreduce some code duplication
Ralf Jung [Tue, 31 May 2022 12:42:22 +0000 (08:42 -0400)]
reduce some code duplication

2 years agoAuto merge of #2166 - RalfJung:tests, r=oli-obk
bors [Tue, 31 May 2022 05:11:43 +0000 (05:11 +0000)]
Auto merge of #2166 - RalfJung:tests, r=oli-obk

ui_test tweaks

- support multiple filters
- make `./miri check` also cover ui_test
- Run opt-level=4 tests again, but only the "run" tests

r? `@oli-obk`

2 years agoAuto merge of #2145 - saethlin:zero-size-creation, r=RalfJung
bors [Mon, 30 May 2022 23:43:51 +0000 (23:43 +0000)]
Auto merge of #2145 - saethlin:zero-size-creation, r=RalfJung

Save a created event for zero-size reborrows

Currently, we don't save a created event for zero-sized reborrows. Attempting to use something from a zero-sized reborrow is surprisingly common, for example on `minimal-lexical==0.2.1` we previously just emit this:
```
Undefined Behavior: attempting a write access using <187021> at alloc72933[0x0], but that tag does not exist in the borrow stack for this location
    --> /root/rust/library/core/src/ptr/mod.rs:1287:9
     |
1287 |         copy_nonoverlapping(&src as *const T, dst, 1);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |         |
     |         attempting a write access using <187021> at alloc72933[0x0], but that tag does not exist in the borrow stack for this location
     |         this error occurs as part of an access at alloc72933[0x0..0x8]
     |
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

     = note: inside `std::ptr::write::<u64>` at /root/rust/library/core/src/ptr/mod.rs:1287:9
note: inside `minimal_lexical::stackvec::StackVec::push_unchecked` at /root/build/src/stackvec.rs:82:13
    --> /root/build/src/stackvec.rs:82:13
     |
82   |             ptr::write(self.as_mut_ptr().add(self.len()), value);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

... backtrace continues...
```
Which leaves us with the question "where did we make this pointer?" because for every other diagnostic you get a "was created by" note, so I suspect people might be tempted to think there is a Miri bug here. I certainly was.

---
This code duplication is so awful, I'm going to take a look at cleaning it up later. The fact that `ptr_get_alloc_id` can fail in this situation makes things annoying.

2 years agoAuto merge of #2169 - RalfJung:rustup, r=RalfJung
bors [Mon, 30 May 2022 23:22:06 +0000 (23:22 +0000)]
Auto merge of #2169 - RalfJung:rustup, r=RalfJung

Rustup

Cc https://github.com/rust-lang/rust/issues/97563

2 years agonormalize away some more line numbers
Ralf Jung [Mon, 30 May 2022 23:21:22 +0000 (19:21 -0400)]
normalize away some more line numbers

2 years agorustup
Ralf Jung [Mon, 30 May 2022 23:19:39 +0000 (19:19 -0400)]
rustup

2 years agoAuto merge of #2168 - RalfJung:power, r=RalfJung
bors [Mon, 30 May 2022 22:01:53 +0000 (22:01 +0000)]
Auto merge of #2168 - RalfJung:power, r=RalfJung

use is_power_of_two where appropriate

2 years agouse is_power_of_two where appropriate
Ralf Jung [Mon, 30 May 2022 21:47:16 +0000 (17:47 -0400)]
use is_power_of_two where appropriate

2 years agoAuto merge of #2165 - saethlin:more-clocks, r=RalfJung
bors [Mon, 30 May 2022 21:41:41 +0000 (21:41 +0000)]
Auto merge of #2165 - saethlin:more-clocks, r=RalfJung

Add support for _COARSE clocks

Original idea does not work, so I'm just going to try expanding support to include the `_COARSE` clocks.

The original motivation for this PR is that the test suite for the crate [`minstant`](https://crates.io/crates/minstant) reports UB, because it tries to use a clock type Miri didn't support, but never checked for an error code and so just used the uninit `libc::timespec`. So, that's technically a bug in `minstant`, but outside of Miri you'd have to be using an incredibly old Linux to ever see an `EINVAL` so the more helpful thing for Miri to do is behave like a newer Linux.

So now we don't detect UB in `minstant`, but we have a test failure:
```
failures:

---- src/instant.rs - instant::Instant::as_unix_nanos (line 150) stdout ----
Test executable failed (exit status: 101).

stderr:
thread 'main' panicked at 'assertion failed: (instant.as_unix_nanos(&anchor) as i64 - expected as i64).abs() < 1_000_000', src/instant.rs:11:1
```
I'm having trouble getting my head around the code in `minstant` that's involved in this test, but as far as I can tell from the man pages, these `_COARSE` clocks meet the requirements.

Closes https://github.com/rust-lang/miri/issues/1983 at least as best as I can.

2 years agoAdd support for _COARSE clocks, spruce up comments
Ben Kimock [Sun, 29 May 2022 22:00:06 +0000 (18:00 -0400)]
Add support for _COARSE clocks, spruce up comments

2 years agomake it possible to test more of ui_test
Ralf Jung [Mon, 30 May 2022 10:56:34 +0000 (12:56 +0200)]
make it possible to test more of ui_test

2 years agofmt
Ralf Jung [Mon, 30 May 2022 10:32:49 +0000 (12:32 +0200)]
fmt

2 years agodon't configure the same regex twice
Ralf Jung [Mon, 30 May 2022 10:28:13 +0000 (12:28 +0200)]
don't configure the same regex twice

2 years agoalso 'check' the test suite
Ralf Jung [Mon, 30 May 2022 10:20:12 +0000 (12:20 +0200)]
also 'check' the test suite

2 years agoprint reason for ignoring
Ralf Jung [Mon, 30 May 2022 08:31:12 +0000 (10:31 +0200)]
print reason for ignoring

2 years agoui_test: printing more consistent with compiletest
Ralf Jung [Mon, 30 May 2022 08:29:02 +0000 (10:29 +0200)]
ui_test: printing more consistent with compiletest

distinguish "ignored" from "filtered out"

2 years agotest mir-opt-level=4 again on run tests
Ralf Jung [Mon, 30 May 2022 08:28:07 +0000 (10:28 +0200)]
test mir-opt-level=4 again on run tests

2 years agoui_test: support multiple filters
Ralf Jung [Mon, 30 May 2022 08:27:41 +0000 (10:27 +0200)]
ui_test: support multiple filters

2 years agoAuto merge of #2158 - rust-lang:gesundheit, r=RalfJung
bors [Mon, 30 May 2022 07:52:48 +0000 (07:52 +0000)]
Auto merge of #2158 - rust-lang:gesundheit, r=RalfJung

Avoid error patterns matching themselves

fixes #2156
fixes https://github.com/rust-lang/miri/issues/2155

this will be obsolete the moment I extract that data from json diagnostics instead of just regexing the stderr.

2 years agoForward CARGO_BUILD_FLAGS to ui_test test suite
Oli Scherer [Mon, 30 May 2022 07:26:47 +0000 (07:26 +0000)]
Forward CARGO_BUILD_FLAGS to ui_test test suite

2 years agoSave a created event for zero-size reborrows
Ben Kimock [Sun, 22 May 2022 23:39:09 +0000 (19:39 -0400)]
Save a created event for zero-size reborrows

2 years agoAuto merge of #2162 - RalfJung:rustup, r=RalfJung
bors [Sun, 29 May 2022 12:07:14 +0000 (12:07 +0000)]
Auto merge of #2162 - RalfJung:rustup, r=RalfJung

rustup

Cc https://github.com/rust-lang/rust/issues/97486

2 years agorustup
Ralf Jung [Sun, 29 May 2022 12:06:35 +0000 (14:06 +0200)]
rustup

2 years agoAuto merge of #2161 - RalfJung:rustup, r=RalfJung
bors [Sun, 29 May 2022 06:34:31 +0000 (06:34 +0000)]
Auto merge of #2161 - RalfJung:rustup, r=RalfJung

rustup

Locally tests pass but rustc CI says they fail, let's see what happens...

Also clarify docs of cmpxchg_weak_failure_rate (Cc https://github.com/rust-lang/miri/issues/2160).

2 years agodisable optimized tests for now
Ralf Jung [Sun, 29 May 2022 06:25:36 +0000 (08:25 +0200)]
disable optimized tests for now

2 years agorustup
Ralf Jung [Sat, 28 May 2022 16:08:13 +0000 (18:08 +0200)]
rustup

2 years agoCommit our ui test crate's cargo lockfile
Oli Scherer [Fri, 27 May 2022 14:24:38 +0000 (14:24 +0000)]
Commit our ui test crate's cargo lockfile

2 years agoReintroduce path filters
Oli Scherer [Fri, 27 May 2022 11:43:14 +0000 (11:43 +0000)]
Reintroduce path filters

2 years agoDon't export private things
Oli Scherer [Fri, 27 May 2022 11:35:26 +0000 (11:35 +0000)]
Don't export private things

2 years agoSelf-descriptive verbosity
Oli Scherer [Wed, 25 May 2022 18:25:45 +0000 (18:25 +0000)]
Self-descriptive verbosity

2 years agoUse unit tests to keep private things private
Oli Scherer [Wed, 25 May 2022 18:24:55 +0000 (18:24 +0000)]
Use unit tests to keep private things private

2 years agoProperly name a test
Oli Scherer [Wed, 25 May 2022 17:58:45 +0000 (17:58 +0000)]
Properly name a test

2 years agoExplain `Comments::parse` arguments
Oli Scherer [Wed, 25 May 2022 17:53:39 +0000 (17:53 +0000)]
Explain `Comments::parse` arguments

2 years agoRun tests for ui_test together with miri test
Oli Scherer [Wed, 25 May 2022 17:48:03 +0000 (17:48 +0000)]
Run tests for ui_test together with miri test

2 years agoUpdate all tests
Oli Scherer [Wed, 25 May 2022 16:15:37 +0000 (16:15 +0000)]
Update all tests

2 years agoMake the file path of the failure more visible to be able to click it faster
Oli Scherer [Wed, 25 May 2022 16:15:31 +0000 (16:15 +0000)]
Make the file path of the failure more visible to be able to click it faster

2 years agoFix annotations matching themselves
Oli Scherer [Wed, 25 May 2022 16:11:37 +0000 (16:11 +0000)]
Fix annotations matching themselves

2 years agoReproduce #2156
Oli Scherer [Wed, 25 May 2022 16:08:41 +0000 (16:08 +0000)]
Reproduce #2156

2 years agoAuto merge of #2157 - RalfJung:tests, r=oli-obk
bors [Wed, 25 May 2022 17:39:53 +0000 (17:39 +0000)]
Auto merge of #2157 - RalfJung:tests, r=oli-obk

tweak new test suite output

- Make the entire "## Running ui tests ..." green, including the target.
- Fix double-space in `testname.rs  .. ok`.
- Make the final summary a bit more like compiletest-rs, in particular the newlines around it
- Use the term "ignored" consistently, rather than "skipped"

r? `@oli-obk`

2 years agotweak new test suite output
Ralf Jung [Wed, 25 May 2022 16:12:54 +0000 (18:12 +0200)]
tweak new test suite output

2 years agoAuto merge of #2151 - RalfJung:numbers, r=oli-obk
bors [Wed, 25 May 2022 14:35:06 +0000 (14:35 +0000)]
Auto merge of #2151 - RalfJung:numbers, r=oli-obk

enable number validity checking and ptr::invalid checking by default

This removes the `-Zmiri-check-number-validity` flag, enabling its effects by default. (We don't error when the flag is passed, for backwards compatibility.) We also enable by default that transmuting an integer to a pointer now creates a pointer with `None` provenance, which is invalid to dereference (and, in the case of a function pointer, invalid to call). I did this together since it is all related to ptr2int/int2ptr transmutation.

Two new flags are added to optionally take back these stricter checks:
- `-Zmiri-allow-uninit-numbers` makes Miri accept uninit data in integers and floats
- `-Zmiri-allow-ptr-int-transmute` makes Miri accept pointers (provenance data) in integers and floats, *and* makes Miri treat int2ptr transmutes as equivalent to a cast.

The flag names make sense IMO, but they are somewhat inconsistent with our existing flags since we usually call things `-Zmiri-disable-$CHECK` rather than `-Zmiri-allow-$THING`. But `-Zmiri-disable-uninit-number-check` sounds silly?

(Whenever I say "transmute" this includes union and pointer based type punning.)
Cc `@saethlin` I hope this won't break everything?^^ I think the most risky part is the int2ptr transmute aspect, in particular around function pointers where no `as` casts are possible. The correct pattern is to first cast to a raw ptr and then transmute that to a fn ptr. We should probably document this better, in the `transmute` documentation and maybe in the documentation for the `fn()` type. I should run this PR against the std test suite before we land it.
r? `@oli-obk`

- [x] Ensure stdlib docs recommend "usize -> raw ptr -> fn ptr" for int-to-fnptr casts: https://github.com/rust-lang/rust/pull/97321
- [x] Run the stdlib test suite

2 years agoenable number validity checking and ptr::invalid checking by default
Ralf Jung [Mon, 23 May 2022 13:44:27 +0000 (15:44 +0200)]
enable number validity checking and ptr::invalid checking by default

2 years agoAuto merge of #2032 - rust-lang:gesundheit, r=oli-obk
bors [Wed, 25 May 2022 13:41:29 +0000 (13:41 +0000)]
Auto merge of #2032 - rust-lang:gesundheit, r=oli-obk

Move test suite to ui tests and bless stderr output

fixes #2027

* [ ] //~ annotations should check that the error happens on their line
* [x] document all the things

2 years agoAdd a custom ui test runner and move all tests to it
Oli Scherer [Thu, 17 Mar 2022 13:49:10 +0000 (13:49 +0000)]
Add a custom ui test runner and move all tests to it

2 years agoAuto merge of #2153 - RalfJung:ptr-invalid, r=RalfJung
bors [Tue, 24 May 2022 15:51:23 +0000 (15:51 +0000)]
Auto merge of #2153 - RalfJung:ptr-invalid, r=RalfJung

with permissive-provenance set, we already treat ptr::invalid correctly

(same for strict provenance, but there it is not surprising)

2 years agowith permissive-provenance set, we already treat ptr::invalid correctly
Ralf Jung [Tue, 24 May 2022 15:49:11 +0000 (17:49 +0200)]
with permissive-provenance set, we already treat ptr::invalid correctly

2 years agoAuto merge of #2138 - JakobDegen:call-fallout, r=RalfJung
bors [Tue, 24 May 2022 15:17:33 +0000 (15:17 +0000)]
Auto merge of #2138 - JakobDegen:call-fallout, r=RalfJung

Adjust Miri to also require return places everywhere

This is the miri side of rust-lang/rust#96098 . It'll still need a bump to rust-version once the rust PR is merged, but the test suite passes against my local build of rustc.

2 years agorustp
Ralf Jung [Tue, 24 May 2022 15:16:03 +0000 (17:16 +0200)]
rustp