about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail
AgeCommit message (Collapse)AuthorLines
2025-07-18Show the memory of uninit readsOli Scherer-43/+50
2025-07-17Report the range of uninit bytes in CTFE errorsOli Scherer-19/+103
2025-07-09miri: fix out-of-bounds error for ptrs with negative offsetsRalf Jung-0/+53
2025-07-02miri: improve errors for type validity assertion failuresRalf Jung-58/+19
2025-06-27Update dangling_pointer_to_raw_pointer.rsleopardracer-1/+1
2025-06-16miri: bless testsDavid Wood-4/+4
These error messages include lines of the standard library which have changed and so need updated.
2025-06-15Merge from rustcRalf Jung-37/+0
2025-06-13Unimplement unsized_localsmejrs-37/+0
2025-06-11Merge pull request #4384 from RalfJung/diag-no-repeatOli Scherer-700/+541
diagnostics: do not repeat the entire message in the span label
2025-06-07bless non-Linux testsRalf Jung-4/+2
2025-06-07make better use of label for data-race and some other errorsRalf Jung-283/+129
2025-06-07diagnostics: do not repeat the entire message in the span labelRalf Jung-508/+505
2025-06-07const-eval error: always say in which item the error occurredRalf Jung-2/+2
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
2025-06-05Rollup merge of #140638 - RalfJung:unsafe-pinned-shared-aliased, ↵Matthias Krüger-0/+115
r=workingjubilee UnsafePinned: also include the effects of UnsafeCell This tackles https://github.com/rust-lang/rust/issues/137750 by including an `UnsafeCell` in `UnsafePinned`, thus imbuing it with all the usual properties of interior mutability (no `noalias` nor `dereferenceable` on shared refs, special treatment by Miri's aliasing model). The soundness issue is not fixed yet because coroutine lowering does not use `UnsafePinned`. The RFC said that `UnsafePinned` would not permit mutability on shared references, but since then, https://github.com/rust-lang/rust/issues/137750 has demonstrated that this is not tenable. In the face of those examples, I propose that we do the "obvious" thing and permit shared mutable state inside `UnsafePinned`. This seems loosely consistent with the fact that we allow going from `Pin<&mut T>` to `&T` (where the former can be aliased with other pointers that perform mutation, and hence the same goes for the latter) -- but the `as_ref` example shows that we in fact would need to add this `UnsafeCell` even if we didn't have a safe conversion to `&T`, since for the compiler and Miri, `&T` and `Pin<&T>` are basically the same type. To make this possible, I had to remove the `Copy` and `Clone` impls for `UnsafePinned`. Tracking issue: https://github.com/rust-lang/rust/issues/125735 Cc ``@rust-lang/lang`` ``@rust-lang/opsem`` ``@Sky9x`` I don't think this needs FCP since the type is still unstable -- we'll finally decide whether we like this approach when `UnsafePinned` is moved towards stabilization (IOW, this PR is reversible). However, I'd still like to make sure that the lang team is okay with the direction I am proposing here.
2025-06-03Rollup merge of #141698 - oli-obk:ctfe-err-flip, r=RalfJungMatthias Krüger-9/+9
Use the informative error as the main const eval error message r? `@RalfJung` I only did the minimal changes necessary to the const eval error machinery. I'd prefer not to mix test changes with refactorings 😆
2025-06-02Clarify why we are talking about a failed const eval at a random placeOli Scherer-3/+3
2025-06-02Use the informative error as the main const eval error messageOli Scherer-9/+9
2025-05-31Merge from rustcThe Miri Cronjob Bot-3/+4
2025-05-30Merge pull request #4314 from yoctocell/fine-grained-trackingRalf Jung-0/+59
TB: Track permissions on the byte-level
2025-05-30Track permissions on the byte-levelXinglu Chen-0/+59
Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Johannes Hostert <jhostert@ethz.ch>
2025-05-30Change diagnostic wordingtiif-4/+2
2025-05-28atomic_load intrinsic: use const generic parameter for orderingRalf Jung-3/+4
2025-05-28add Miri testsRalf Jung-0/+115
2025-05-27Auto merge of #129658 - saethlin:spare-a-crumb, r=jhprattbors-4/+1
Add some track_caller info to precondition panics Currently, when you encounter a precondition check, you'll always get the caller location of the implementation of the precondition checks. But with this PR, you'll be told the location of the invalid call. Which is useful. I thought of this while looking at https://github.com/rust-lang/rust/pull/129642#issuecomment-2311703898. The changes to `tests/ui/const*` happen because the const-eval interpreter skips `#[track_caller]` frames in its backtraces. The perf implications of this are: * Increased debug binary sizes. The caller_location implementation requires that the additional data we want to display here be stored in const allocations, which are deduplicated but not across crates. There is no impact on optimized build sizes. The panic path and the caller location data get optimized out. * The compile time hit to opt-incr-patched bitmaps happens because the patch changes the line number of some function calls with precondition checks, causing us to go from 0 dirty CGUs to 1 dirty CGU. * The other compile time hits are marginal but real, and due to doing a handful of new queries. Adding more useful data isn't completely free.
2025-05-26Auto merge of #141406 - RalfJung:less-force-allocate, r=oli-obkbors-13/+7
interpret: do not force_allocate all return places A while ago I cleaned up our `PlaceTy` a little, but as a side-effect of that, return places had to always be force-allocated. That turns out to cause quite a few extra allocations, and for a project we are doing where we marry Miri with a model checker, that means a lot of extra work -- local variables are just so much easier to reason about than allocations. So, this PR brings back the ability to have the return place be just a local of the caller. To make this work cleanly I had to rework stack pop handling a bit, which also changes the output of Miri in some cases as the span for errors occurring during a particular phase of stack pop changed. With these changes, a no-std binary with a function of functions that just take and return scalar types and that uses no pointers now does not move *any* local variables into memory. :) r? `@oli-obk`
2025-05-24rename internal panicking::try to catch_unwindRalf Jung-6/+6
2025-05-22interpret: do not force_allocate all return placesRalf Jung-13/+7
2025-05-22enable isolated-stdin test on WindowsRalf Jung-1/+1
2025-05-21Add some track_caller info to precondition panicsBen Kimock-4/+1
2025-05-21Merge pull request #4337 from RalfJung/ioRalf Jung-0/+28
test direct usage of io::{stdout,stderr,stdin}
2025-05-21test direct usage of io::{stdout,stderr,stdin}Ralf Jung-0/+28
2025-05-21Merge from rustcThe Miri Cronjob Bot-16/+10
2025-05-20make std::intrinsic functions actually be intrinsicsRalf Jung-16/+10
2025-05-19run tests on mips-unknown-linux-gnuRalf Jung-0/+1
2025-05-17Auto merge of #141133 - matthiaskrgr:rollup-u8ndxyz, r=matthiaskrgrbors-53/+61
Rollup of 9 pull requests Successful merges: - #135808 (Implement Display for ``rustc_target::callconv::Conv``) - #137432 (Add as_ascii_unchecked() methods to char, u8, and str) - #139103 (deduplicate abort implementations) - #140917 (checktools.sh: fix bashism) - #141035 (turn lld warning on old gccs into info log) - #141118 (Enable rust-analyzer to go from query definition to the corresponding provider field) - #141121 (Only select true errors in `impossible_predicates`) - #141125 (check coroutines with `TypingMode::Borrowck` to avoid cyclic reasoning) - #141131 (Make some `match`es slightly more ergonomic in `librustdoc`) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-17Rollup merge of #139103 - joboet:abort_dedup, r=tgross35Matthias Krüger-35/+43
deduplicate abort implementations Currently, the code for process aborts is duplicated across `panic_abort` and `std`. This PR uses `#[rustc_std_internal_symbol]` to make the `std` implementation available to `panic_abort` via the linker, thereby deduplicating the code.
2025-05-17Rollup merge of #135808 - tiif:conv_display, r=workingjubileeMatthias Krüger-18/+18
Implement Display for ``rustc_target::callconv::Conv`` Follow up of https://github.com/rust-lang/rust/pull/133103#discussion_r1885552854
2025-05-15normalize abort calls in miri testsjoboet-35/+43
2025-05-08remove stray stderr fileRalf Jung-22/+0
2025-05-05Merge pull request #4307 from JoJoDeveloping/remove-unique-is-uniqueRalf Jung-169/+0
Remove -Zunique-is-unique
2025-05-04Remove -Zunique-is-uniqueJohannes Hostert-169/+0
2025-05-03Merge from rustcThe Miri Cronjob Bot-119/+89
2025-05-02Rollup merge of #140521 - RalfJung:oob-error, r=saethlinMatthias Krüger-89/+89
interpret: better error message for out-of-bounds pointer arithmetic and accesses Fixes https://github.com/rust-lang/rust/issues/93881 r? `@saethlin`
2025-05-01Rollup merge of #140034 - RalfJung:simd_select_bitmask-padding, r=workingjubileeGuillaume Gomez-30/+0
simd_select_bitmask: the 'padding' bits in the mask are just ignored Fixes https://github.com/rust-lang/rust/issues/137942: we documented simd_select_bitmask to require the 'padding' bits in the mask (the mask can sometimes be longer than the vector; I am referring to these extra bits as 'padding' here) to be zero, mostly because nobody felt like doing the research for what should be done when they are non-zero. However, codegen is already perfectly happy just ignoring them, so in practice they can have any value. Some of the intrinsic wrappers in stdarch have trouble ensuring that they are zero. So let's just adjust the docs and Miri to permit non-zero 'padding' bits. Cc ````@Amanieu```` ````@workingjubilee````
2025-05-01Merge pull request #4273 from yoctocell/new-cell-stateRalf Jung-6/+6
TB: add `Cell` state to support more fine-grained tracking of interior mutable data
2025-05-01Add `Cell` state to Tree BorrowsXinglu Chen-6/+6
2025-04-30interpret: better error message for out-of-bounds pointer arithmetic and ↵Ralf Jung-89/+89
accesses
2025-04-29add -Zmiri-deterministic-concurrency flag and use it for concurrency testsRalf Jung-105/+52
2025-04-29Merge pull request #4272 from geetanshjuneja/schedulingRalf Jung-39/+39
Make thread scheduling fully random
2025-04-29Added random schedulinggeetanshjuneja-39/+39