about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail
AgeCommit message (Collapse)AuthorLines
2023-12-17do not allow ABI mismatches inside repr(C) typesRalf Jung-0/+33
2023-12-12also add a Miri testRalf Jung-0/+43
2023-12-05fix miri_promise_symbolic_alignment for huge alignmentsRalf Jung-0/+22
2023-12-05Merge from rustcThe Miri Conjob Bot-19/+14
2023-12-04fmtThe Miri Conjob Bot-10/+2
2023-12-04Auto merge of #116915 - bend-n:unwet, r=saethlinbors-19/+14
Add an assume that the index is inbounds to slice::get_unchecked Fixes #116878
2023-12-04use `assume(idx < self.len())` in `[T]::get_unchecked`bendn-19/+14
2023-12-03Auto merge of #117840 - RalfJung:miri-promise-align, r=cjgillotbors-0/+83
miri: support 'promising' alignment for symbolic alignment check Then use that ability in `slice::align_to`, so that even with `-Zmiri-symbolic-alignment-check`, it no longer has to return spuriously empty "middle" parts. Fixes https://github.com/rust-lang/miri/issues/3068
2023-12-03miri: support 'promising' alignment for symbolic alignment checkRalf Jung-0/+83
2023-12-03Auto merge of #118567 - RalfJung:miri, r=RalfJungbors-10/+14
Miri subtree update r? `@ghost`
2023-12-03Auto merge of #118487 - RalfJung:exposed-provenance, r=thomccbors-4/+4
move exposed-provenance APIs into separate feature gate We have already stated explicitly for all the 'exposed' functions that > Using this method means that code is *not* following strict provenance rules. However, they were part of the same feature gate and still described as part of the strict provenance experiment. Unfortunately, their semantics are much less clear and certainly nowhere near stabilization, so in preparation for an attempt to stabilize the strict provenance APIs, I suggest we split the things related to "exposed" into their own feature gate. I also used this opportunity to better explain how Exposed Provenance fits into the larger plan here: this is *one possible candidate* for `as` semantics, but we don't know if it is actually viable, so we can't really promise that it is equivalent to `as`. If it works out we probably want to make `as` equivalent to the 'exposed' APIs; if it doesn't, we will remove them again and try to find some other semantics for `as`.
2023-12-03Merge from rustcThe Miri Conjob Bot-1/+1
2023-12-02Auto merge of #118077 - calebzulawski:sync-portable-simd-2023-11-19, ↵bors-1/+1
r=workingjubilee Portable SIMD subtree update Syncs nightly to the latest changes from rust-lang/portable-simd r? `@rust-lang/libs`
2023-11-30move exposed-provenance APIs into separate feature gate and explain the ↵Ralf Jung-4/+4
relationship of Exposed Provenance and Strict Provenance
2023-11-30move some validity-related tests into subdirRalf Jung-8/+8
2023-11-30move 'uninit' tests into common directoryRalf Jung-2/+4
2023-11-30Merge from rustcRalf Jung-0/+42
2023-11-29explain tests that disable the provenance GCRalf Jung-0/+2
2023-11-28add test checking that aggregate assignments reset memory to uninit firstRalf Jung-0/+42
2023-11-26Update std::simd usage and test outputsCaleb Zulawski-1/+1
2023-11-25blessRalf Jung-16/+16
2023-11-25blessRalf Jung-1/+1
2023-11-25Merge from rustcRalf Jung-431/+431
2023-11-24Manual find replace updatesNilstrieb-8/+8
2023-11-24Bless Miri testsNilstrieb-423/+423
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24Refactor `float_to_int_checked` to remove its generic parameter and reduce ↵Eduardo Sánchez Muñoz-48/+48
code duplication a bit
2023-11-23Merge from rustcThe Miri Conjob Bot-3/+0
2023-11-22Auto merge of #3180 - eduardosm:check-intrinsics-target-feature, r=RalfJungbors-0/+57
Check that target features required by LLVM intrinsics are enabled Fixes https://github.com/rust-lang/miri/issues/3178
2023-11-22Check that target features required by LLVM intrinsics are enabledEduardo Sánchez Muñoz-0/+57
2023-11-22Stabilize RFC3324 dyn upcasting coercionUrgau-3/+0
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
2023-11-21Rollup merge of #118029 - saethlin:allocid-gc, r=RalfJungNilstrieb-2/+2
Expand Miri's BorTag GC to a Provenance GC As suggested in https://github.com/rust-lang/miri/issues/3080#issuecomment-1732505573 We previously solved memory growth issues associated with the Stacked Borrows and Tree Borrows runtimes with a GC. But of course we also have state accumulation associated with whole allocations elsewhere in the interpreter, and this PR starts tackling those. To do this, we expand the visitor for the GC so that it can visit a BorTag or an AllocId. Instead of collecting all live AllocIds into a single HashSet, we just collect from the Machine itself then go through an accessor `InterpCx::is_alloc_live` which checks a number of allocation data structures in the core interpreter. This avoids the overhead of all the inserts that collecting their keys would require. r? ``@RalfJung``
2023-11-19Rollup merge of #117832 - RalfJung:interpret-shift, r=cjgillotMichael Goulet-0/+24
interpret: simplify handling of shifts by no longer trying to handle signed and unsigned shift amounts in the same branch While we're at it, also update comments in codegen and MIR building related to shifts, and fix the overflow error printed by Miri on negative shift amounts.
2023-11-19tag-gc -> provenance-gcBen Kimock-2/+2
2023-11-14Auto merge of #117330 - tmiasko:custom-mir-cleanup-blocks, r=cjgillotbors-30/+30
Custom MIR: Support cleanup blocks Cleanup blocks are declared with `bb (cleanup) = { ... }`. `Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following: * `UnwindContinue()` * `UnwindUnreachable()` * `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup` * `UnwindCleanup(block)` Also support unwind resume and unwind terminate terminators: * `UnwindResume()` * `UnwindTerminate(reason)`
2023-11-14Custom MIR: Support cleanup blocksTomasz Miąsko-30/+30
Cleanup blocks are declared with `bb (cleanup) = { ... }`. `Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following: * `UnwindContinue()` * `UnwindUnreachable()` * `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup` * `UnwindCleanup(block)` Also support unwind resume and unwind terminate terminators: * `UnwindResume()` * `UnwindTerminate(reason)`
2023-11-12more consistent naming for TLS testsRalf Jung-9/+9
2023-11-12allow allocations referenced by main thread TLS to leakmax-heller-0/+98
2023-11-12interpret: simplify handling of shifts by no longer trying to handle signed ↵Ralf Jung-0/+24
and unsigned shift amounts in the same branch
2023-11-10data_race: link to docs for 'unusual' race conditionsRalf Jung-0/+6
2023-11-04Auto merge of #3145 - RalfJung:data-race-error, r=RalfJungbors-106/+112
give some more help for the unusual data races Fixes https://github.com/rust-lang/miri/issues/3142
2023-11-02Merge from rustcThe Miri Conjob Bot-2/+2
2023-11-01Rollup merge of #115626 - clarfonthey:unchecked-math, r=thomccMatthias Krüger-2/+2
Clean up unchecked_math, separate out unchecked_shifts Tracking issue: #85122 Changes: 1. Remove `const_inherent_unchecked_arith` flag and make const-stability flags the same as the method feature flags. Given the number of other unsafe const fns already stabilised, it makes sense to just stabilise these in const context when they're stabilised. 2. Move `unchecked_shl` and `unchecked_shr` into a separate `unchecked_shifts` flag, since the semantics for them are unclear and they'll likely be stabilised separately as a result. 3. Add an `unchecked_neg` method exclusively to signed integers, under the `unchecked_neg` flag. This is because it's a new API and probably needs some time to marinate before it's stabilised, and while it *would* make sense to have a similar version for unsigned integers since `checked_neg` also exists for those there is absolutely no case where that would be a good idea, IMQHO. The longer-term goal here is to prepare the `unchecked_math` methods for an FCP and stabilisation since they've existed for a while, their semantics are clear, and people seem in favour of stabilising them.
2023-10-30make sure we catch UB with _ pattern in various syntactic positionsRalf Jung-4/+81
2023-10-28Auto merge of #3149 - RalfJung:atomic-readonly-loads, r=RalfJungbors-31/+62
accept some atomic loads from read-only memory matches https://github.com/rust-lang/rust/pull/115577
2023-10-28accept some atomic loads from read-only memoryRalf Jung-31/+62
2023-10-28add some tests specifically for validity checks arising from match bindersRalf Jung-0/+59
2023-10-28fmtThe Miri Conjob Bot-1/+0
2023-10-27Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJungbors-0/+57
Allow partially moved values in match This PR attempts to unify the behaviour between `let _ = PLACE`, `let _: TY = PLACE;` and `match PLACE { _ => {} }`. The logical conclusion is that the `match` version should not check for uninitialised places nor check that borrows are still live. The `match PLACE {}` case is handled by keeping a `FakeRead` in the unreachable fallback case to verify that `PLACE` has a legal value. Schematically, `match PLACE { arms }` in surface rust becomes in MIR: ```rust PlaceMention(PLACE) match PLACE { // Decision tree for the explicit arms arms, // An extra fallback arm _ => { FakeRead(ForMatchedPlace, PLACE); unreachable } } ``` `match *borrow { _ => {} }` continues to check that `*borrow` is live, but does not read the value. `match *borrow {}` both checks that `*borrow` is live, and fake-reads the value. Continuation of ~https://github.com/rust-lang/rust/pull/102256~ ~https://github.com/rust-lang/rust/pull/104844~ Fixes https://github.com/rust-lang/rust/issues/99180 https://github.com/rust-lang/rust/issues/53114
2023-10-27give some more help for the unusual data racesRalf Jung-12/+18
2023-10-27data-race: preserve structured access information longer, and don't ↵Ralf Jung-104/+104
upper-case access types