about summary refs log tree commit diff
path: root/src/tools/miri
AgeCommit message (Collapse)AuthorLines
2024-03-08Tweak the way we protect in-place function arguments in interpretersMaybe Waffle-11/+4
Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be"). This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame).
2024-03-08Rollup merge of #121194 - beetrees:rustc-raw-args, r=petrochenkovMatthias Krüger-2/+4
Refactor pre-getopts command line argument handling Rebased version of #111658. I've also fixed the Windows CI failure (although I don't have access to Windows to test it myself).
2024-03-08fix clippy lintsRalf Jung-5/+5
2024-03-08Merge from rustcThe Miri Cronjob Bot-113/+118
2024-03-08Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-03-07Auto merge of #122139 - GuillaumeGomez:rollup-37vtwsc, r=GuillaumeGomezbors-1/+7
Rollup of 10 pull requests Successful merges: - #121863 (silence mismatched types errors for implied projections) - #122043 (Apply `EarlyBinder` only to `TraitRef` in `ImplTraitHeader`) - #122066 (Add proper cfgs for struct HirIdValidator used only with debug-assert) - #122104 (Rust is a proper name: rust → Rust) - #122110 (Make `x t miri` respect `MIRI_TEMP`) - #122114 (Make not finding core a fatal error) - #122115 (Cancel parsing ever made during recovery) - #122123 (Don't require specifying unrelated assoc types when trait alias is in `dyn` type) - #122126 (Fix `tidy --bless` on ̶X̶e̶n̶i̶x̶ Windows) - #122129 (Set `RustcDocs` to only run on host) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-07Auto merge of #121985 - RalfJung:interpret-return-place, r=oli-obkbors-112/+111
interpret: avoid a long-lived PlaceTy in stack frames `PlaceTy` uses a representation that's not very stable under changes to the stack. I'd feel better if we didn't have one in the long-term machine state. r? `@oli-obk`
2024-03-07Use `rustc_driver::args::raw_args()` in Miribeetrees-2/+4
2024-03-06Add advice for failing `shims/fs.rs` miri testMaybe Waffle-0/+4
2024-03-06Make `x t miri` respect `MIRI_TEMP`Maybe Waffle-1/+3
2024-03-06make remaining FloatTy matches exhaustiveRalf Jung-19/+17
2024-03-06Merge from rustcRalf Jung-2/+33
2024-03-06Preparing for merge from rustcRalf Jung-1/+1
2024-03-06Auto merge of #121956 - ChrisDenton:srwlock, r=joboetbors-0/+21
Windows: Implement condvar, mutex and rwlock using futex Well, the Windows equivalent: [`WaitOnAddress`,](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress) [`WakeByAddressSingle`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddresssingle) and [`WakeByAddressAll`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddressall). Note that Windows flavoured futexes can be different sizes (1, 2, 4 or 8 bytes). I took advantage of that in the `Mutex` implementation. I also edited the Mutex implementation a bit more than necessary. I was having trouble keeping in my head what 0, 1 and 2 meant so I replaced them with consts. I *think* we're maybe spinning a bit much. `WaitOnAddress` seems to be looping quite a bit too. But for now I've keep the implementations the same. I do wonder if it'd be worth reducing or removing our spinning on Windows. This also adds a new shim to miri, because of course it does. Fixes #121949
2024-03-06Stabilize `imported_main`clubby789-6/+0
2024-03-06Auto merge of #3340 - RalfJung:no-disable-abi-check, r=oli-obkbors-128/+11
remove the ability to disable ABI checking This got deprecated in https://github.com/rust-lang/miri/pull/3071, about half a year ago. `@rust-lang/miri` I think it's fine to remove this now.
2024-03-05Rename `DiagnosticMessage` as `DiagMessage`.Nicholas Nethercote-2/+2
2024-03-05Windows: Implement mutex using futexChris Denton-0/+21
Well, the Windows equivalent: `WaitOnAddress`, `WakeByAddressSingle` and `WakeByAddressAll`.
2024-03-04consistently use MPlaceTy for return placesRalf Jung-112/+111
2024-03-04Bump mio from 0.8.10 to 0.8.11 in /test_dependenciesdependabot[bot]-2/+2
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/tokio-rs/mio/releases) - [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: mio dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04Auto merge of #3358 - RalfJung:zzz, r=RalfJungbors-10/+17
give macOS even more time to sleep
2024-03-04give macOS even more time to sleepRalf Jung-10/+17
2024-03-04Auto merge of #3357 - RalfJung:imports, r=RalfJungbors-8/+12
reorder rustc crate imports a bit
2024-03-04Auto merge of #3356 - RalfJung:typo, r=RalfJungbors-1/+1
Conjob → Cronjob Same as https://github.com/rust-lang/miri-test-libstd/pull/44
2024-03-04reorder rustc crate imports a bitRalf Jung-8/+12
2024-03-04Conjob → CronjobRalf Jung-1/+1
2024-03-04Use cargo miri clean in build-all-targets.shBen Kimock-1/+1
2024-03-04we properly rebuild the cache now when MIRI_LIB_SRC contents changeRalf Jung-5/+1
2024-03-04Auto merge of #3351 - RalfJung:diagnostic-dedup-considered-harmful, r=RalfJungbors-5/+36
disable diagnostic deduplication `@oli-obk` is there a better way to do this? Ideally we'd only set this when interpretation starts but the value in the compiler session seems to be immutable. I assume people will do `cargo check` before `cargo miri` so hopefully this won't lead to too much confusion. Fixes https://github.com/rust-lang/miri/issues/3350
2024-03-04Auto merge of #3339 - RalfJung:remove-old-flags, r=saethlinbors-11/+0
remove some flags that haven't had an effect in a while `@rust-lang/miri` any objections to this?
2024-03-04linux-futex test: add commentRalf Jung-0/+1
2024-03-04implement manual deduplication for isolation-error=warn-nobacktraceRalf Jung-5/+16
2024-03-04disable diagnostic deduplicationRalf Jung-0/+19
2024-03-03Auto merge of #121936 - RalfJung:miri, r=RalfJungbors-343/+607
Miri subtree update r? `@ghost`
2024-03-03Auto merge of #3330 - RossSmyth:win-fmt, r=RalfJungbors-30/+64
Fix .\miri fmt on Windows This allows .\miri fmt to work on Windows. Closes #3317. To reiterate, the problem with using `miri fmt` on Windows is that the CLI arguments to rustfmt are too long. Currently over 65,000 characters are used in the call to rustfmt, [which is incompatible with Windows](https://devblogs.microsoft.com/oldnewthing/20031210-00/?p=41553) as it is limited to (2^15 - 1) for all arguments plus all env vars. Two things are done do get around this limit: 1. Call out to cargo-fmt for the crates that exist. 2. Batch rustfmt calls by length Another alternative would be to just use rustfmt for everything and don't use cargo-fmt for the crates. I don't know how much you guys may care about `miri fmt` time to run. I don't know the diff as it did not work before on my computer. [I have another branch that solves this, but in a less permanent way](RossSmyth/miri/tree/windows-fmt). That was my initial attempt, and I learned that even with cargo-fmt and relative paths, the rustfmt call still has 27k characters. This is closer to the limit than I expected, so it would not be a permanent solution. So I went back to absolute paths & batching.
2024-03-03nits and typosRalf Jung-3/+4
2024-03-03do not rely on tracing's scope exit logging, it is wrongRalf Jung-9/+19
2024-03-03log when we change the active threadRalf Jung-4/+12
2024-03-03fix MIRI_LOG=info not setting the level for miri itselfRalf Jung-1/+1
2024-03-03Auto merge of #3345 - RalfJung:win-get-thread-name, r=RalfJungbors-44/+145
Windows: support getting the thread name Also organize the thread name tests a bit.
2024-03-03Windows: support getting the thread nameRalf Jung-20/+94
2024-03-03fix wording of alloc access tracking messageRalf Jung-1/+1
2024-03-03readmeRalf Jung-0/+2
2024-03-03move thread-panic tests to their own file; test getting the thread nameRalf Jung-24/+51
2024-03-02Fix .\miri fmt on WindowsRoss Smyth-30/+63
2024-03-02Tree Borrows: print where the forbidden access happens; make tag tracking ↵Ralf Jung-104/+125
less verbose
2024-03-02remove the ability to disable ABI checkingRalf Jung-128/+11
2024-03-02add option to track all read/write accesses to tracked allocationsRalf Jung-14/+38
2024-03-02print thread name in miri error backtracesRalf Jung-170/+219
2024-03-02remove some flags that haven't had an effect in a whileRalf Jung-11/+0