]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAdd a dedicated thread for output printing
Oli Scherer [Mon, 18 Jul 2022 09:02:40 +0000 (09:02 +0000)]
Add a dedicated thread for output printing

2 years agoAuto merge of #2398 - sunshowers:nextest-compat, r=RalfJung
bors [Thu, 21 Jul 2022 01:52:14 +0000 (01:52 +0000)]
Auto merge of #2398 - sunshowers:nextest-compat, r=RalfJung

[cargo-miri] support nextest

Add the ability to run `cargo miri nextest list` and `cargo miri nextest run`.

[cargo-nextest](https://nexte.st) is a new test runner for Rust maintained mostly by myself. It has several new features, but the most relevant to miri is the fact that it runs [each test in its own process](https://nexte.st/book/how-it-works.html#the-nextest-model). This gives miri users better leak detection (https://github.com/rust-lang/miri/issues/1481) for free, for example.

See https://github.com/nextest-rs/nextest/issues/181 for discussion, including comments by `@eddyb` and `@RalfJung.`

Future work might be to have miri read [the list of tests](https://docs.rs/nextest-metadata/latest/nextest_metadata/struct.TestListSummary.html) (or [test binaries](https://docs.rs/nextest-metadata/latest/nextest_metadata/struct.BinaryListSummary.html)) generated by `nextest list`. `@eddyb` thinks that might be useful.

I tested `cargo miri nextest run` against smallvec, and it worked great.

Note: Running tests out of archives is currently broken, as the comment in run-test.py explains.

2 years ago[cargo-miri] support nextest
Rain [Wed, 20 Jul 2022 02:37:24 +0000 (19:37 -0700)]
[cargo-miri] support nextest

Add the ability to run the `list` and `run` nextest commands, which
enable per-test isolation.

2 years agoAuto merge of #2381 - rust-lang:infra, r=RalfJung
bors [Thu, 21 Jul 2022 00:38:37 +0000 (00:38 +0000)]
Auto merge of #2381 - rust-lang:infra, r=RalfJung

Add a scheme for always using the default toolchain, running clippy and fmt before running any other command

I keep forgetting to run rustup-toolchain on rebases across toolchain updates

I also keep forgetting to run rustfmt and clippy. The former isn't run by vscode if I don't explicitly save (I have autosave on).

2 years agofix miri script
Ralf Jung [Thu, 21 Jul 2022 00:37:54 +0000 (20:37 -0400)]
fix miri script

2 years agoAdd a scheme for always using the default toolchain, running clippy and fmt before...
Oli Scherer [Wed, 20 Jul 2022 12:38:27 +0000 (12:38 +0000)]
Add a scheme for always using the default toolchain, running clippy and fmt before running any other command

2 years agoAuto merge of #2404 - RalfJung:mix, r=RalfJung
bors [Wed, 20 Jul 2022 22:32:41 +0000 (22:32 +0000)]
Auto merge of #2404 - RalfJung:mix, r=RalfJung

check for extern static size mismatches

Also handle get_alloc_extra the same throughout Stacked Borrows. I don't think this `unwrap` can actually cause an ICE since another part of SB will raise an error before, but still, seems strange to do this inconsistently in retagging vs expose_ptr.

2 years agosome stray tag → prov renames
Ralf Jung [Wed, 20 Jul 2022 22:31:44 +0000 (18:31 -0400)]
some stray tag → prov renames

2 years agocheck for extern static size mismatches
Ralf Jung [Wed, 20 Jul 2022 21:40:27 +0000 (17:40 -0400)]
check for extern static size mismatches

2 years agohandle get_alloc_extra the same throughout Stacked Borrows
Ralf Jung [Wed, 20 Jul 2022 21:40:49 +0000 (17:40 -0400)]
handle get_alloc_extra the same throughout Stacked Borrows

2 years agoAuto merge of #2403 - RalfJung:rustup, r=RalfJung
bors [Wed, 20 Jul 2022 20:11:10 +0000 (20:11 +0000)]
Auto merge of #2403 - RalfJung:rustup, r=RalfJung

rustup

2 years agorustup
Ralf Jung [Wed, 20 Jul 2022 20:02:06 +0000 (16:02 -0400)]
rustup

2 years agoAuto merge of #2402 - RalfJung:cargo-target, r=RalfJung
bors [Wed, 20 Jul 2022 19:47:48 +0000 (19:47 +0000)]
Auto merge of #2402 - RalfJung:cargo-target, r=RalfJung

cargo-miri: reorder --target to after the user-defined commands

This should help with https://github.com/rust-lang/miri/pull/2398.

2 years agocargo-miri: reorder --target to after the user-defined commands
Ralf Jung [Wed, 20 Jul 2022 19:47:09 +0000 (15:47 -0400)]
cargo-miri: reorder --target to after the user-defined commands

2 years agoAuto merge of #2373 - rust-lang:test_dependencies, r=RalfJung
bors [Wed, 20 Jul 2022 15:59:21 +0000 (15:59 +0000)]
Auto merge of #2373 - rust-lang:test_dependencies, r=RalfJung

Allow ui tests to have dependencies in a reliable way

This completely sidesteps the issue that compiletest-rs has where old artifacts of a dependency cause `multiple available crates of name XXX` errors. At this point I think we've reached feature parity for clippy, too, so I'm going to try publishing a version once this is merged.

2 years agoAllow tests to have dependencies
Oli Scherer [Thu, 14 Jul 2022 10:03:08 +0000 (10:03 +0000)]
Allow tests to have dependencies

2 years agoAuto merge of #2401 - RalfJung:dyn, r=RalfJung
bors [Wed, 20 Jul 2022 15:27:42 +0000 (15:27 +0000)]
Auto merge of #2401 - RalfJung:dyn, r=RalfJung

fix test file name

Would be better to run this test when doing `./miri test dyn`.

2 years agofix test file name
Ralf Jung [Wed, 20 Jul 2022 15:27:04 +0000 (11:27 -0400)]
fix test file name

2 years agoAuto merge of #2391 - RalfJung:stderr, r=oli-obk
bors [Wed, 20 Jul 2022 12:39:21 +0000 (12:39 +0000)]
Auto merge of #2391 - RalfJung:stderr, r=oli-obk

on an error, always print the unnormalized stderr

Currently we skip this if a stderr diff was printed, but the stderr diff is normalized, so e.g. one cannot learn line numbers from it.

Is there a way to get the diff to only print the parts the differ, like a usual `diff -u`? Currently it always seems to print the full output, so with a long stderr we now get doubly long test results even if the diff is actually rather small.

2 years agoAuto merge of #2399 - RalfJung:subcommands, r=RalfJung
bors [Wed, 20 Jul 2022 11:43:38 +0000 (11:43 +0000)]
Auto merge of #2399 - RalfJung:subcommands, r=RalfJung

no need for an exhaustive enum of subcommands

2 years agono need for an exhaustive enum of subcommands
Ralf Jung [Wed, 20 Jul 2022 11:42:08 +0000 (07:42 -0400)]
no need for an exhaustive enum of subcommands

2 years agoAuto merge of #2397 - RalfJung:cleanup, r=RalfJung
bors [Wed, 20 Jul 2022 02:12:09 +0000 (02:12 +0000)]
Auto merge of #2397 - RalfJung:cleanup, r=RalfJung

only do env var cleanup if all threads have stopped

Hopefully fixes https://github.com/rust-lang/miri/issues/2396

2 years agoonly do env var cleanup if all threads have stopped
Ralf Jung [Wed, 20 Jul 2022 01:44:45 +0000 (21:44 -0400)]
only do env var cleanup if all threads have stopped

2 years agoAuto merge of #2394 - saethlin:unique-range-ice, r=RalfJung
bors [Wed, 20 Jul 2022 01:39:40 +0000 (01:39 +0000)]
Auto merge of #2394 - saethlin:unique-range-ice, r=RalfJung

Fix bugs where unique_range became invalid

And also expand the cache integrity checks to cover this case.

I'm going to run this over all the ICEs I've gotten out of Miri recently, could be a bit.

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

2 years agoClarify implementation a bit
Ben Kimock [Wed, 20 Jul 2022 00:53:48 +0000 (20:53 -0400)]
Clarify implementation a bit

2 years agoAdd a minimal reproducer of the ICE
Ben Kimock [Wed, 20 Jul 2022 00:22:04 +0000 (20:22 -0400)]
Add a minimal reproducer of the ICE

Co-authored-by: Ralf Jung <post@ralfj.de>
2 years agoFix bugs where unique_range became invalid
Ben Kimock [Tue, 19 Jul 2022 21:08:17 +0000 (17:08 -0400)]
Fix bugs where unique_range became invalid

And also expand the cache integrity checks to cover this case, and
generally assert a lot more about the unique_range, then tighten up
sloppy implementation scenarios that this uncovered.

2 years agoAuto merge of #2395 - RalfJung:upcast, r=RalfJung
bors [Tue, 19 Jul 2022 23:40:30 +0000 (23:40 +0000)]
Auto merge of #2395 - RalfJung:upcast, r=RalfJung

add some dyn upcasting tests

Copied from the rustc test suite.

2 years agoadd some dyn upcasting tests
Ralf Jung [Tue, 19 Jul 2022 23:39:30 +0000 (19:39 -0400)]
add some dyn upcasting tests

2 years agoAuto merge of #2392 - RalfJung:rustup, r=RalfJung
bors [Tue, 19 Jul 2022 19:45:27 +0000 (19:45 +0000)]
Auto merge of #2392 - RalfJung:rustup, r=RalfJung

rustup

2 years agorustup
Ralf Jung [Tue, 19 Jul 2022 19:44:47 +0000 (15:44 -0400)]
rustup

2 years agotweak failure output a little
Ralf Jung [Tue, 19 Jul 2022 18:44:00 +0000 (14:44 -0400)]
tweak failure output a little

2 years agoon an error, always print the unnormalized stderr
Ralf Jung [Tue, 19 Jul 2022 18:40:17 +0000 (14:40 -0400)]
on an error, always print the unnormalized stderr

2 years agoAuto merge of #2390 - RalfJung:debug, r=RalfJung
bors [Tue, 19 Jul 2022 18:15:05 +0000 (18:15 +0000)]
Auto merge of #2390 - RalfJung:debug, r=RalfJung

fix some debugging papercuts

- detect when Miri got locally installed and is being run with the wrong toolchain
- when an ICE occurs, print a backtrace of where the interpreter was at the time

2 years agoshow where the interpreter was interpreting when an ICE occurs
Ralf Jung [Tue, 19 Jul 2022 17:31:43 +0000 (13:31 -0400)]
show where the interpreter was interpreting when an ICE occurs

2 years agoshow a better error when running Miri with the wrong sysroot
Ralf Jung [Tue, 19 Jul 2022 17:19:00 +0000 (13:19 -0400)]
show a better error when running Miri with the wrong sysroot

2 years agoAuto merge of #2350 - RalfJung:remove-deprecated, r=oli-obk
bors [Tue, 19 Jul 2022 12:29:29 +0000 (12:29 +0000)]
Auto merge of #2350 - RalfJung:remove-deprecated, r=oli-obk

remove deprecated options

These have been deprecated a month ago and nobody said they need them. Is that enough time? We can also let this PR sit a little.

Cc https://github.com/rust-lang/miri/issues/2187 https://github.com/rust-lang/miri/issues/2188
(keeping them open to track removing their supporting infrastructure in the core interpreter)

2 years agoAuto merge of #2388 - RalfJung:rustup, r=RalfJung
bors [Tue, 19 Jul 2022 12:04:07 +0000 (12:04 +0000)]
Auto merge of #2388 - RalfJung:rustup, r=RalfJung

rustup

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

2 years agorustup
Ralf Jung [Tue, 19 Jul 2022 12:03:39 +0000 (08:03 -0400)]
rustup

2 years agoAuto merge of #2386 - RalfJung:xargo-atomic, r=RalfJung
bors [Tue, 19 Jul 2022 11:17:12 +0000 (11:17 +0000)]
Auto merge of #2386 - RalfJung:xargo-atomic, r=RalfJung

cargo-miri: write the Xargo project files atomically

`@matthiaskrgr` this should fix https://github.com/rust-lang/miri/issues/2340. Any chance you could test this before we land it?

2 years agoAuto merge of #2387 - RalfJung:ui-readme, r=oli-obk
bors [Tue, 19 Jul 2022 09:26:14 +0000 (09:26 +0000)]
Auto merge of #2387 - RalfJung:ui-readme, r=oli-obk

update ui_test readme

I forgot to do that when changing the ignore/only syntax.

2 years agoupdate ui_test readme
Ralf Jung [Tue, 19 Jul 2022 01:42:50 +0000 (21:42 -0400)]
update ui_test readme

2 years agocargo-miri: write the Xargo project files atomically
Ralf Jung [Mon, 18 Jul 2022 23:50:03 +0000 (19:50 -0400)]
cargo-miri: write the Xargo project files atomically

2 years agoAuto merge of #2385 - RalfJung:dev, r=RalfJung
bors [Mon, 18 Jul 2022 21:49:32 +0000 (21:49 +0000)]
Auto merge of #2385 - RalfJung:dev, r=RalfJung

use env vars, not Cargo.toml, to configure out dev profile

This should fix the cargo warnings we are seeing in rustc.

2 years agouse env vars, not Cargo.toml, to configure out dev profile
Ralf Jung [Mon, 18 Jul 2022 21:47:32 +0000 (17:47 -0400)]
use env vars, not Cargo.toml, to configure out dev profile

2 years agoAuto merge of #2382 - RalfJung:atomic, r=RalfJung
bors [Mon, 18 Jul 2022 12:56:44 +0000 (12:56 +0000)]
Auto merge of #2382 - RalfJung:atomic, r=RalfJung

add support for new RMW orders

Implements support for https://github.com/rust-lang/rust/pull/98383.

Also restructure intrinsic shims a bit so we have atomic and SIMD intrinsics in their own file, and refactor atomic intrinsic name parsing.

2 years agorefactor atomic intrinsic handling to actually parse the intrinsic name
Ralf Jung [Mon, 18 Jul 2022 12:55:50 +0000 (08:55 -0400)]
refactor atomic intrinsic handling to actually parse the intrinsic name

2 years agomake atomic intrinsic impl details private
Ralf Jung [Mon, 18 Jul 2022 12:22:27 +0000 (08:22 -0400)]
make atomic intrinsic impl details private

2 years agoadd support for new RMW orders
Ralf Jung [Mon, 18 Jul 2022 12:20:06 +0000 (08:20 -0400)]
add support for new RMW orders

2 years agoremove ret param from foreign_item hierarchy
Ralf Jung [Mon, 18 Jul 2022 12:05:46 +0000 (08:05 -0400)]
remove ret param from foreign_item hierarchy

2 years agomove simd intrinsics to their own file
Ralf Jung [Mon, 18 Jul 2022 12:00:36 +0000 (08:00 -0400)]
move simd intrinsics to their own file

2 years agomove atomic intrinsics to their own file
Ralf Jung [Mon, 18 Jul 2022 11:55:11 +0000 (07:55 -0400)]
move atomic intrinsics to their own file

2 years agoAuto merge of #2379 - RalfJung:ui-test-target-filter, r=oli-obk
bors [Mon, 18 Jul 2022 07:26:49 +0000 (07:26 +0000)]
Auto merge of #2379 - RalfJung:ui-test-target-filter, r=oli-obk

ui_test: more robust syntax for target filtering

Implicit fallbacks are always fragile and prone to typos, so let's be explicit.

2 years agoAuto merge of #2380 - RalfJung:isatty, r=RalfJung
bors [Mon, 18 Jul 2022 02:32:04 +0000 (02:32 +0000)]
Auto merge of #2380 - RalfJung:isatty, r=RalfJung

isatty tweaks

`@saethlin` I realized we need to gate this behind the isolation flag, sorry. :/  The point of isolated mode is that it is 100% deterministic, so we cannot call host functions that might give different answers on different runs.

2 years agolibc test: also call isatty on an actual file
Ralf Jung [Mon, 18 Jul 2022 01:51:52 +0000 (21:51 -0400)]
libc test: also call isatty on an actual file

2 years agomake an expect into proper error reporting
Ralf Jung [Mon, 18 Jul 2022 01:57:56 +0000 (21:57 -0400)]
make an expect into proper error reporting

2 years agoui_test: more robust syntax for target filtering
Ralf Jung [Mon, 18 Jul 2022 01:54:10 +0000 (21:54 -0400)]
ui_test: more robust syntax for target filtering

2 years agowith isolation we want to be fully deterministic
Ralf Jung [Mon, 18 Jul 2022 01:50:10 +0000 (21:50 -0400)]
with isolation we want to be fully deterministic

2 years agoAuto merge of #2349 - saethlin:isatty, r=RalfJung
bors [Mon, 18 Jul 2022 01:37:38 +0000 (01:37 +0000)]
Auto merge of #2349 - saethlin:isatty, r=RalfJung

Improve isatty support

Per https://github.com/rust-lang/miri/issues/2292#issuecomment-1171858283, this is an attempt at

> do something more clever with Miri's `isatty` shim

Since Unix -> Unix is very simple, I'm starting with a patch that just does that. Happy to augment/rewrite this based on feedback.

The linked file in libtest specifically only supports stdout. If we're doing this to support terminal applications, I think it would be strange to support one but not all 3 of the standard streams.

The `atty` crate contains a bunch of extra logic that libtest does not contain, in order to support MSYS terminals: https://github.com/softprops/atty/commit/db8d55f88eabfcc22cde39533c2b1d688d1cdfc6 so I think if we're going to do Windows support, we should probably access all that logic somehow. I think it's pretty clear that the implementation is not going to change, so I think if we want to, pasting the contents of the `atty` crate into Miri is on the table, instead of taking a dependency.

2 years agoTest that isatty doesn't crash
Ben Kimock [Mon, 18 Jul 2022 01:13:59 +0000 (21:13 -0400)]
Test that isatty doesn't crash

2 years agoPass through isatty if the host is also unix
Ben Kimock [Fri, 8 Jul 2022 18:48:26 +0000 (14:48 -0400)]
Pass through isatty if the host is also unix

2 years agoAuto merge of #2378 - RalfJung:sb, r=RalfJung
bors [Sun, 17 Jul 2022 14:40:37 +0000 (14:40 +0000)]
Auto merge of #2378 - RalfJung:sb, r=RalfJung

use PlaceTy visitor and dedup sime retagging code

I benchmarked this and as far as I can see the difference to the old code is totally within noise. And this makes the code a lot simpler and removes duplication so yay. :)

2 years agoremove a fastpath that does not seem to actually help
Ralf Jung [Sun, 17 Jul 2022 14:32:03 +0000 (10:32 -0400)]
remove a fastpath that does not seem to actually help

2 years agouse PlaceTy visitor
Ralf Jung [Sun, 17 Jul 2022 14:19:29 +0000 (10:19 -0400)]
use PlaceTy visitor

2 years agoAuto merge of #2376 - RalfJung:rustup, r=RalfJung
bors [Sun, 17 Jul 2022 12:19:31 +0000 (12:19 +0000)]
Auto merge of #2376 - RalfJung:rustup, r=RalfJung

rustup

2 years agomake unused flags work like they used to
Ralf Jung [Sun, 17 Jul 2022 03:44:37 +0000 (23:44 -0400)]
make unused flags work like they used to

2 years agoAuto merge of #2377 - rust-lang:only-on-host, r=oli-obk
bors [Sun, 17 Jul 2022 11:00:55 +0000 (11:00 +0000)]
Auto merge of #2377 - rust-lang:only-on-host, r=oli-obk

Add test flag for running a test only on the host

2 years agoclippy
Oli Scherer [Sun, 17 Jul 2022 08:07:26 +0000 (08:07 +0000)]
clippy

2 years agoAdd test flag for running a test only on the host
Oli Scherer [Sun, 17 Jul 2022 07:56:57 +0000 (07:56 +0000)]
Add test flag for running a test only on the host

2 years agoRemove `--offline` from `./miri install` as otherwise we can't add more dependencies...
Oli Scherer [Sun, 17 Jul 2022 07:46:02 +0000 (07:46 +0000)]
Remove `--offline` from `./miri install` as otherwise we can't add more dependencies to miri as CI will fail.

if you want this locally, pass it to your invocation.

2 years agorustup
Ralf Jung [Sun, 17 Jul 2022 03:40:36 +0000 (23:40 -0400)]
rustup

2 years agoAuto merge of #2368 - RalfJung:debug, r=oli-obk
bors [Fri, 15 Jul 2022 15:54:47 +0000 (15:54 +0000)]
Auto merge of #2368 - RalfJung:debug, r=oli-obk

Make "./miri {build,run,test}" use debug assertions but "./miri install" not

This makes `./miri run`/`./miri test` use the full set of debug assertions (including the rather expensive ones that check consistency of the Stacked Borrows cache), but `./miri install` installs a Miri *without* those debug assertions.

That's the same behavior as cargo, and helps catch Miri bugs with the test suite while making installed Miri usable for larger runs.

2 years agoAuto merge of #2375 - RalfJung:rustup, r=RalfJung
bors [Fri, 15 Jul 2022 13:39:11 +0000 (13:39 +0000)]
Auto merge of #2375 - RalfJung:rustup, r=RalfJung

Rustup

2 years agorustup
Ralf Jung [Fri, 15 Jul 2022 12:09:43 +0000 (08:09 -0400)]
rustup

2 years agoclarify how to run the manually installed Miri
Ralf Jung [Fri, 15 Jul 2022 12:02:13 +0000 (08:02 -0400)]
clarify how to run the manually installed Miri

2 years agoensure that RangeMap panics on OOB
Ralf Jung [Thu, 14 Jul 2022 18:27:24 +0000 (14:27 -0400)]
ensure that RangeMap panics on OOB

2 years agomake some debug assertions in RangeObjectMap be full assertions
Ralf Jung [Thu, 14 Jul 2022 17:23:35 +0000 (13:23 -0400)]
make some debug assertions in RangeObjectMap be full assertions

2 years agouse the cargo default for debug/release builds
Ralf Jung [Thu, 14 Jul 2022 17:08:09 +0000 (13:08 -0400)]
use the cargo default for debug/release builds

2 years agomake cache consistency checks into regular debug assertions
Ralf Jung [Thu, 14 Jul 2022 12:06:37 +0000 (08:06 -0400)]
make cache consistency checks into regular debug assertions

2 years agodon't forcefully enable debug assertions, but make -debug mode usable
Ralf Jung [Wed, 13 Jul 2022 23:22:22 +0000 (19:22 -0400)]
don't forcefully enable debug assertions, but make -debug mode usable

still set those flags on CI though, we want to catch overflow there

2 years agoAuto merge of #2372 - RalfJung:rustup, r=RalfJung
bors [Thu, 14 Jul 2022 13:55:40 +0000 (13:55 +0000)]
Auto merge of #2372 - RalfJung:rustup, r=RalfJung

rustup

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

2 years agorustup
Ralf Jung [Thu, 14 Jul 2022 13:54:20 +0000 (09:54 -0400)]
rustup

2 years agoAuto merge of #2370 - RalfJung:weak-mem-test, r=RalfJung
bors [Thu, 14 Jul 2022 12:23:47 +0000 (12:23 +0000)]
Auto merge of #2370 - RalfJung:weak-mem-test, r=RalfJung

add another weak mem consistency test

`@cbeuw` your code seems to do this correctly? :D

2 years agotest that we can see this weak behavior
Ralf Jung [Thu, 14 Jul 2022 12:23:04 +0000 (08:23 -0400)]
test that we can see this weak behavior

2 years agoreplace a macro by a function
Ralf Jung [Thu, 14 Jul 2022 12:13:24 +0000 (08:13 -0400)]
replace a macro by a function

2 years agoadd work-around for #2164
Ralf Jung [Thu, 14 Jul 2022 12:07:59 +0000 (08:07 -0400)]
add work-around for #2164

2 years agoAuto merge of #2371 - RalfJung:rustup, r=RalfJung
bors [Thu, 14 Jul 2022 11:59:46 +0000 (11:59 +0000)]
Auto merge of #2371 - RalfJung:rustup, r=RalfJung

rustup

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

2 years agofix a missing thread join
Ralf Jung [Thu, 14 Jul 2022 11:29:20 +0000 (07:29 -0400)]
fix a missing thread join

2 years agorustup
Ralf Jung [Thu, 14 Jul 2022 02:35:45 +0000 (22:35 -0400)]
rustup

2 years agoadd another weak mem consistency test
Ralf Jung [Thu, 14 Jul 2022 00:18:45 +0000 (20:18 -0400)]
add another weak mem consistency test

2 years agoAuto merge of #2328 - RalfJung:perf, r=RalfJung
bors [Thu, 14 Jul 2022 00:34:00 +0000 (00:34 +0000)]
Auto merge of #2328 - RalfJung:perf, r=RalfJung

move checking ptr tracking on item pop into cold helper function

Before:
```
Benchmark 1: cargo miri run --manifest-path bench-cargo-miri/serde1/Cargo.toml
  Time (mean ± σ):      6.729 s ±  0.050 s    [User: 6.608 s, System: 0.124 s]
  Range (min … max):    6.665 s …  6.799 s    5 runs

Benchmark 2: cargo miri run --manifest-path bench-cargo-miri/unicode/Cargo.toml
  Time (mean ± σ):     20.923 s ±  0.271 s    [User: 20.386 s, System: 0.537 s]
  Range (min … max):   20.580 s … 21.165 s    5 runs
```
After:
```
Benchmark 1: cargo miri run --manifest-path bench-cargo-miri/serde1/Cargo.toml
  Time (mean ± σ):      6.562 s ±  0.023 s    [User: 6.430 s, System: 0.135 s]
  Range (min … max):    6.544 s …  6.594 s    5 runs

Benchmark 2: cargo miri run --manifest-path bench-cargo-miri/unicode/Cargo.toml
  Time (mean ± σ):     20.375 s ±  0.228 s    [User: 19.964 s, System: 0.413 s]
  Range (min … max):   20.201 s … 20.736 s    5 runs
```
Nothing major, but we'll take it I guess. :shrug:

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

2 years agoAuto merge of #2369 - RalfJung:reborrow, r=RalfJung
bors [Thu, 14 Jul 2022 00:04:40 +0000 (00:04 +0000)]
Auto merge of #2369 - RalfJung:reborrow, r=RalfJung

reborrow error: clarify that we are reborrowing *from* that tag

`@saethlin` I found the current message not entirely clear, so what do you think about this?

2 years agoreborrow error: clarify that we are reborrowing *from* that tag
Ralf Jung [Wed, 13 Jul 2022 23:40:53 +0000 (19:40 -0400)]
reborrow error: clarify that we are reborrowing *from* that tag

2 years agomove stacked_borrows.rs together with the other files of its module
Ralf Jung [Wed, 13 Jul 2022 23:37:41 +0000 (19:37 -0400)]
move stacked_borrows.rs together with the other files of its module

2 years agoAuto merge of #2367 - RalfJung:ui-test-regex, r=RalfJung
bors [Wed, 13 Jul 2022 23:00:23 +0000 (23:00 +0000)]
Auto merge of #2367 - RalfJung:ui-test-regex, r=RalfJung

use ui_test regex capabilities

We can have more precise patterns now, so use them for some of the tests where that makes sense. :)

2 years agouse ui_test regex capabilities
Ralf Jung [Wed, 13 Jul 2022 22:59:33 +0000 (18:59 -0400)]
use ui_test regex capabilities

2 years agomove checking ptr tracking on item pop into cold helper function
Ralf Jung [Mon, 4 Jul 2022 18:53:54 +0000 (14:53 -0400)]
move checking ptr tracking on item pop into cold helper function

2 years agoAuto merge of #2364 - rust-lang:regex_error_annotations, r=RalfJung
bors [Wed, 13 Jul 2022 16:53:38 +0000 (16:53 +0000)]
Auto merge of #2364 - rust-lang:regex_error_annotations, r=RalfJung

Error patterns can be regexes

fixes #2362

2 years agoError patterns can be regexes
Oli Scherer [Wed, 13 Jul 2022 13:09:23 +0000 (13:09 +0000)]
Error patterns can be regexes

2 years agoAuto merge of #2352 - saethlin:new-benchmark, r=RalfJung
bors [Wed, 13 Jul 2022 14:24:14 +0000 (14:24 +0000)]
Auto merge of #2352 - saethlin:new-benchmark, r=RalfJung

Add a benchmark of the hang-on-test-failure code path

This is the code pattern that produces the performance problem in https://github.com/rust-lang/miri/issues/2273

I figured out what I was stuck on in https://github.com/rust-lang/miri/pull/2315#discussion_r916387919. For a while I was just doing `let x: &[u8] = &[0u8; 4096];` but that doesn't produce the runtime inside `Stack::item_popped` that I was looking for, I think because this allocation is never deallocated. But with `Vec`, I get the profile I'm looking for.