summary refs log tree commit diff
path: root/src/tools/miri
AgeCommit message (Collapse)AuthorLines
2023-01-19Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkovbors-6/+5
Various cleanups around pre-TyCtxt queries and functions part of #105462 based on https://github.com/rust-lang/rust/pull/106776 (everything starting at [0e2b39f](https://github.com/rust-lang/rust/pull/106810/commits/0e2b39fd1ffde51b50d45ccbe41de52b85136b8b) is new in this PR) r? `@petrochenkov` I think this should be most of the uncontroversial part of #105462.
2023-01-17add miri regression testThe 8472-0/+6
2023-01-16Move compiler input and ouput paths into sessionOli Scherer-6/+5
2023-01-16Group some commonly passed together values into a structOli Scherer-1/+1
2023-01-14Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-SimulacrumMatthias Krüger-2/+3
Stop probing for statx unless necessary As is the current toy program: fn main() -> std::io::Result<()> { use std::fs; let metadata = fs::metadata("foo.txt")?; assert!(!metadata.is_dir()); Ok(()) } ... observed under strace will issue: [snip] statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address) statx(AT_FDCWD, "foo.txt", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0 While statx is not necessarily always present, checking for it can be delayed to the first error condition. Said condition may very well never happen, in which case the check got avoided altogether. Note this is still suboptimal as there still will be programs issuing it, but bulk of the problem is removed. Tested by forbidding the syscall for the binary and observing it correctly falls back to newfstatat. While here tidy up the commentary, in particular by denoting some problems with the current approach.
2023-01-12Auto merge of #105603 - oli-obk:non_repeatable_queries, r=petrochenkovbors-1/+1
Harden the pre-tyctxt query system against accidental recomputation While the current compiler has no issues where we `take` and then compute the query again, in https://github.com/rust-lang/rust/pull/105462 I accidentally introduced such a case. I also took the opportunity to remove `peek_mut`, which is only ever used for `global_tcx` to then invoke `enter`. I added an `enter` method directly on the query.
2023-01-12Harden the pre-tyctxt query system against accidental recomputationOli Scherer-1/+1
2023-01-11Stabilize `::{core,std}::pin::pin!`Daniel Henry-Mantilla-4/+0
2023-01-11Fix up stat test in libc-fs-with-isolationMateusz Guzik-2/+3
The test relied on Error::last_os_error() coming from the stat call on the passed file, but there is no guarantee this will be the case. Instead extract errno from the error returned by the routine. Patch de facto written by joboet. Co-authored-by: joboet <jonasboettiger@icloud.com>
2023-01-09add dtors_in_dtors_in_dtorsRalf Jung-0/+57
2023-01-09Auto merge of #2753 - RalfJung:rustup, r=RalfJungbors-1/+1
Rustup Pulls in https://github.com/rust-lang/rust/pull/104658
2023-01-09Preparing for merge from rustcRalf Jung-1/+1
2023-01-09Auto merge of #2752 - RalfJung:win-env-current-exe, r=RalfJungbors-13/+85
make env::current_exe work on Windows
2023-01-09make env::current_exe work on WindowsRalf Jung-13/+85
2023-01-06Bump tokio from 1.23.0 to 1.23.1 in /test_dependenciesdependabot[bot]-3/+3
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.23.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.0...tokio-1.23.1) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05Test again wasm32-unknown-unknownAaron Hill-2/+80
2023-01-05Ignore symbol shim clash when symbol is provided by `compiler_builtins`Aaron Hill-1/+10
When this happens, we ignore the symbol from `compiler_builtins` in favor of Miri's builtin support. This allows Miri to target platforms like wasm32-unknown-unknown, where functions like `memcmp` are provided by `compiler_builtins`.
2023-01-03clippyRalf Jung-2/+1
2023-01-03Merge from rustcRalf Jung-0/+5
2023-01-03Preparing for merge from rustcRalf Jung-1/+1
2023-01-02tweaks to retag diagnostic handlingRalf Jung-13/+9
2022-12-31Add missing extern crate rustc_driverbjorn3-0/+5
2022-12-28no need to do a no_std build for wasiRalf Jung-3/+5
2022-12-28test using a JSON target fileRalf Jung-0/+26
2022-12-28bump dependenciesRalf Jung-133/+154
2022-12-28print sysroot build failure errorRalf Jung-3/+5
2022-12-28simplify path joining code a bitRalf Jung-9/+1
2022-12-28handle unknown targets more gracefullyRalf Jung-60/+92
2022-12-27cargo-miri: use rustc to determine the output filenameRalf Jung-40/+66
2022-12-25enable some warnings that rustc bootstrap enablesRalf Jung-4/+4
2022-12-25use cargo-install to install josh-proxyRalf Jung-4/+4
2022-12-24fix warningsRalf Jung-3/+3
2022-12-24Merge from rustcRalf Jung-62/+227
2022-12-24Preparing for merge from rustcRalf Jung-1/+1
2022-12-24Auto merge of #2646 - saethlin:data-race-spans, r=RalfJungbors-273/+555
Data race spans Fixes https://github.com/rust-lang/miri/issues/2205 This adds output to data race errors very similar to the spans we emit for Stacked Borrows errors. For example, from our test suite: ``` help: The Atomic Load on thread `<unnamed>` is here --> tests/fail/data_race/atomic_read_na_write_race1.rs:23:13 | 23 | ... (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write o... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: The Write on thread `<unnamed>` is here --> tests/fail/data_race/atomic_read_na_write_race1.rs:19:13 | 19 | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^``` ``` Because of https://github.com/rust-lang/miri/pull/2647 this comes without a perf regression, according to our benchmarks.
2022-12-23Mention and number the components of a race in the order the interpreter ↵Ben Kimock-113/+113
sees them
2022-12-23fix one more unaligned self.ptr, and add testsRalf Jung-0/+14
2022-12-23attempt to clarify what the backtrace belongs to when there could be ambiguityRalf Jung-90/+93
2022-12-23fix IntoIter::drop on high-alignment ZSTRalf Jung-7/+12
2022-12-22Add a (1) and (2) to the data race errorsBen Kimock-113/+113
2022-12-22Auto merge of #103957 - JakobDegen:drop-retag, r=RalfJungbors-0/+146
Retag as FnEntry on `drop_in_place` This commit changes the mir drop shim to always retag its argument as if it were a `&mut`. cc rust-lang/unsafe-code-guidelines#373
2022-12-21Fix phrasingBen Kimock-28/+28
2022-12-21Clean up implementation, deduplicate in errorsBen Kimock-255/+103
2022-12-21Don't run `Drop` terminators on types that do not have drop glue in const evalJakob Degen-2/+2
2022-12-22Rollup merge of #105986 - eltociear:patch-18, r=RalfJungYuki Okushi-1/+1
Fix typo in reading_half_a_pointer.rs gurantee -> guarantee
2022-12-22Rollup merge of #105602 - RalfJung:read-convenience, r=oli-obkYuki Okushi-54/+54
interpret: add read_machine_[ui]size convenience methods We have `read_pointer`, so it felt inconsistent to not also have these. r? ```@oli-obk```
2022-12-21Bless testsJakob Degen-4/+4
2022-12-21Retag argument to `drop_in_place` unconditionallyJakob Degen-19/+5
2022-12-21Retag as FnEntry on `drop_in_place`Jakob Degen-0/+160
2022-12-21update josh onstructionsRalf Jung-6/+6