Commit graph

530 commits

Author SHA1 Message Date
Oli Scherer
fa99459b42 Reintroduce the span printing in miri (plus point to spans where possible) 2022-12-06 18:59:46 +00:00
Oli Scherer
7782a2b70d Remove now-redundant file/line info from const backtraces 2022-12-06 18:59:46 +00:00
Ralf Jung
16a9fdf663 Preparing for merge from rustc 2022-12-05 13:51:41 +01:00
Ralf Jung
3fa692c8b2 for now, do not do fake reads on non-Unpin mutable references 2022-12-03 19:05:56 +01:00
Ralf Jung
3b4cbe9095 add test for self-referential future 2022-12-03 18:38:16 +01:00
Ralf Jung
29814f2e2a clippy 2022-12-03 13:31:57 +01:00
Ralf Jung
b64d8670e4 Merge from rustc 2022-12-02 18:16:08 +01:00
Ralf Jung
80ab672b86 Preparing for merge from rustc 2022-12-02 18:14:53 +01:00
bors
7d75cc48fe Auto merge of #2710 - RalfJung:ptr-tracking-ice, r=oli-obk
fix ICE in pointer tracking

Fixes https://github.com/rust-lang/miri/issues/2709
2022-12-02 15:36:49 +00:00
bors
4a64902a9d Auto merge of #2711 - RalfJung:btrack, r=RalfJung
slight simplifications for borrow tracking

and some renaming for consistency
2022-12-02 13:48:14 +00:00
Ralf Jung
0d1e365272 fix ICE in pointer tracking 2022-12-02 14:47:25 +01:00
Ralf Jung
b12ce552ff rename some more types for consistency 2022-12-02 14:44:41 +01:00
Ralf Jung
595490e8dd slight simplifications for borrow tracking 2022-12-02 14:43:05 +01:00
bors
89dd322512 Auto merge of #2708 - RalfJung:verbose-setup, r=RalfJung
forward verbosity to cargo setup
2022-12-02 13:19:27 +00:00
Ralf Jung
5fd4b84e20 forward verbosity to cargo setup 2022-12-02 13:57:20 +01:00
Vanille-N
ab08f2a813
fix imports 2022-12-02 13:30:06 +01:00
Vanille-N
8bb3d9e94a
other renames, introduction of BorrowTrackerMethod and AllocExtra 2022-12-02 13:29:48 +01:00
Vanille-N
3a01493433
SbTag -> BorTag everywhere 2022-12-02 13:27:41 +01:00
Vanille-N
2528f4e668
move stacked_borrows to borrow_tracker/stacked_borrows 2022-12-02 13:23:57 +01:00
Vanille-N
2d42d265ea
extract common borrow tracking logic 2022-12-02 13:23:37 +01:00
Oli Scherer
e8ff9b1836 Bump ui_test crate 2022-12-01 14:43:29 +00:00
bors
623b4aba6c Auto merge of #2699 - RalfJung:schedule-refactor, r=RalfJung
refactor scheduler

Refactors the scheduler to use something akin to a generator -- a callback that will be invoked when the stack of a thread is empty, which has the chance to push a new stack frame or do other things and then indicates whether this thread is done, or should be scheduled again. (Unfortunately I think we [cannot use actual generators](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Generators.20that.20borrow.20on.20each.20resume.3F) here.) The interpreter loop is now a proper infinite loop, the only way to leave it is for some kind of interrupt to be triggered (represented as `InterpError`) -- unifying how we handle 'exit when calling `process::exit`' and 'exit when main thread quits'.

The last commit implements an alternative approach to https://github.com/rust-lang/miri/pull/2660 using this new structure. Fixes https://github.com/rust-lang/miri/issues/2629.
2022-12-01 09:08:06 +00:00
Matthias Krüger
9a96a6dd82
Rollup merge of #104933 - RalfJung:interpret-partial-ord, r=oli-obk
interpret: remove PartialOrd from a bunch of types that do not have or need a sensible order

r? `@oli-obk`
2022-11-28 17:25:47 +01:00
Ralf Jung
ef5d5e7895 decreasw yield count a bit and explain reasoning a bit more 2022-11-28 10:29:15 +01:00
bors
5c2592cd43 Auto merge of #2698 - RalfJung:miri-in-rustc, r=oli-obk
replace 'locally built rustc' instructions by 'Miri in rustc'
2022-11-28 09:21:46 +00:00
Ralf Jung
63eae2b30f add many-seeds capabilities to CI 2022-11-28 08:58:21 +01:00
Ralf Jung
ad9784eb3d make ./miri run a bit more silent; add option to control seeds tested by many-seeds 2022-11-28 08:53:14 +01:00
Ralf Jung
af92b04855 move interpreter loop into thread manager; they are pretty tightly coupled anyway 2022-11-28 08:53:14 +01:00
Ralf Jung
5238d17797 fix TLS on partially supported OSes 2022-11-28 08:53:14 +01:00
Ralf Jung
c9b9c17fca add scoped thread test 2022-11-28 08:53:14 +01:00
Ralf Jung
ec003fdd9c yield the main thread a number of times after its TLS dtors are done 2022-11-28 08:53:14 +01:00
Ralf Jung
0849084d06 cleanup global imports a bit 2022-11-28 08:53:14 +01:00
Ralf Jung
a0d104d5f7 refactor scheduling of TLS dtors 2022-11-28 08:53:14 +01:00
Ralf Jung
598c3da627 clippy 2022-11-27 20:53:17 +01:00
Ralf Jung
6d1e99e96e advice on josh pushing 2022-11-27 20:52:17 +01:00
Ralf Jung
187ba67781 Preparing for merge from rustc 2022-11-27 20:51:50 +01:00
bors
66354f0043 Auto merge of #2694 - RalfJung:retag-deref-check, r=saethlin
fix handling of spurious accesses during retag

The `dereferenceable` attribute we emit for LLVM is checked during retag in Stacked Borrows.
However, we currently don't properly do that for retagging of `&mut !Unpin`, which this PR fixes.
Also this adjusts retagging to inform the data race model of the accesses as well.

Fixes https://github.com/rust-lang/miri/issues/2648.
Also fixes https://github.com/rust-lang/miri/issues/2693 since the same issue arose for retagging as well.

r? `@saethlin`
2022-11-27 19:03:21 +00:00
bors
a83b105b4c Auto merge of #2685 - Nilstrieb:cargo-miri-wasm, r=RalfJung
Use `.wasm` extension when building for wasm in cargo-miri

WASM uses the `.wasm` file extension for its binaries (just like how windows uses `.exe`), so we need to set that as well.

I'm not sure whether gating this behind the wasm target is a good idea, maybe it makes more sense to always do it just like on windows.
2022-11-27 13:31:05 +00:00
bors
9f8df93b09 Auto merge of #2701 - RalfJung:smoke, r=RalfJung
run_tests_minimal: actually run the smoke test on the desired target
2022-11-27 12:45:34 +00:00
Ralf Jung
c6587b0160 run_tests_minimal: actually run the smoke test on the desired target 2022-11-27 13:26:31 +01:00
Ralf Jung
b20efbd79f CI: fix begingroup printing 2022-11-27 13:20:44 +01:00
nils
958d5918b0 Use .wasm extension when building for wasm in cargo-miri
WASM uses the `.wasm` file extension for its binaries (just like how
windows uses `.exe`), so we need to set that as well.
2022-11-27 10:25:32 +01:00
Ralf Jung
b6ae82bd5c replace 'locally built rustc' instructions by 'Miri in rustc' 2022-11-27 10:02:28 +01:00
Ralf Jung
edf8154695 nits 2022-11-27 00:06:00 +01:00
Ralf Jung
a3bd57823f make Stacked Borrows retags act like data races 2022-11-27 00:03:49 +01:00
Ralf Jung
a7f72218c8 slightly adjust and synchronize Machine passing for SB and DataRace 2022-11-27 00:03:49 +01:00
Ralf Jung
f479404b12 !Unpin retags must still be reads, to check dereferenceable
also fix ICE on deallocation error and avoid redundant find_granting on retag
2022-11-27 00:03:07 +01:00
bors
144b4859ad Auto merge of #2696 - RalfJung:no-std-windows, r=RalfJung
make no_std work on Windows

Also fixes https://github.com/rust-lang/miri/issues/1123 by cherry-picking a patch by `@DrMeepster.`
2022-11-26 15:15:22 +00:00
Ralf Jung
3158a8d476 support no_std on Windows 2022-11-26 16:14:58 +01:00
Ralf Jung
245857beb7 refactor try_resolve_did and also support resolving crates/modules 2022-11-26 16:14:58 +01:00