about summary refs log tree commit diff
path: root/src/tools/miri/tests/pass
AgeCommit message (Collapse)AuthorLines
2023-12-16Visit the AllocIds and BorTags in borrow state FrameExtraBen Kimock-0/+17
2023-12-15Auto merge of #3226 - saethlin:deadpool-test, r=RalfJungbors-0/+16
Add a regression test for rust#115145 Per https://github.com/rust-lang/rust/pull/118805#issuecomment-1855264860
2023-12-15Add the test minimized from deadpoolBen Kimock-0/+16
2023-12-15Merge from rustcThe Miri Conjob Bot-0/+21
2023-12-14add test for uninhabited saved locals in a coroutineRalf Jung-0/+31
2023-12-13fix computing the dynamic alignment of packed structs with dyn trait tailsRalf Jung-0/+21
2023-12-12fmtThe Miri Conjob Bot-1/+0
2023-12-12Merge from rustcThe Miri Conjob Bot-6/+7
2023-12-11use Waker::noop instead of defining our own WakerRalf Jung-63/+17
2023-12-11Auto merge of #117758 - Urgau:lint_pointer_trait_comparisons, r=davidtwcobors-0/+2
Add lint against ambiguous wide pointer comparisons This PR is the resolution of https://github.com/rust-lang/rust/issues/106447 decided in https://github.com/rust-lang/rust/issues/117717 by T-lang. ## `ambiguous_wide_pointer_comparisons` *warn-by-default* The `ambiguous_wide_pointer_comparisons` lint checks comparison of `*const/*mut ?Sized` as the operands. ### Example ```rust let ab = (A, B); let a = &ab.0 as *const dyn T; let b = &ab.1 as *const dyn T; let _ = a == b; ``` ### Explanation The comparison includes metadata which may not be expected. ------- This PR also drops `clippy::vtable_address_comparisons` which is superseded by this one. ~~One thing: is the current naming right? `invalid` seems a bit too much.~~ Fixes https://github.com/rust-lang/rust/issues/117717
2023-12-11Auto merge of #118032 - RalfJung:char-u32, r=Mark-Simulacrumbors-1/+5
guarantee that char and u32 are ABI-compatible In https://github.com/rust-lang/rust/pull/116894 we added a guarantee that `char` has the same alignment as `u32`, but there is still one axis where these types could differ: function call ABI. So let's nail that down as well: in a function signature, `char` and `u32` are completely equivalent. This is a new stable guarantee, so it will need t-lang approval.
2023-12-10remove redundant importssurechen-5/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-12-08Fix x86 SSE4.1 ptestnzcEduardo Sánchez Muñoz-0/+5
`(op & mask) == 0` and `(op & mask) == mask` need each to be calculated for the whole vector. For example, given * `op = [0b100, 0b010]` * `mask = [0b100, 0b110]` The correct result would be: * `op & mask = [0b100, 0b010]` Comparisons are done on the vector as a whole: * `all_zero = (op & mask) == [0, 0] = false` * `masked_set = (op & mask) == mask = false` * `!all_zero && !masked_set = true` The previous method: `op & mask = [0b100, 0b010]` Comparisons are done element-wise: * `all_zero = (op & mask) == [0, 0] = [true, true]` * `masked_set = (op & mask) == mask = [true, false]` * `!all_zero && !masked_set = [true, false]` After folding with AND, the final result would be `false`, which is incorrect.
2023-12-06Adjust tests for newly added ambiguous_wide_pointer_comparisons lintUrgau-0/+2
2023-12-05fix miri_promise_symbolic_alignment for huge alignmentsRalf Jung-0/+12
2023-12-05fix typo in commentRalf Jung-1/+1
2023-12-05fmtThe Miri Conjob Bot-20/+24
2023-12-05Merge from rustcThe Miri Conjob Bot-2/+75
2023-12-04Rollup merge of #118540 - RalfJung:unsized-packed-offset, r=TaKO8KiTakayuki Maeda-0/+73
codegen, miri: fix computing the offset of an unsized field in a packed struct `#[repr(packed)]` strikes again. Fixes https://github.com/rust-lang/rust/issues/118537 Fixes https://github.com/rust-lang/miri/issues/3200 `@bjorn3` I assume cranelift needs the same fix.
2023-12-04Merge from rustcThe Miri Conjob Bot-33/+19
2023-12-04Auto merge of #116915 - bend-n:unwet, r=saethlinbors-2/+2
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-2/+2
2023-12-03Auto merge of #117840 - RalfJung:miri-promise-align, r=cjgillotbors-30/+16
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-30/+16
2023-12-03SIMD bitmasks: use 'round up to multiple of 8' rather than 'clamp to at least 8'Ralf Jung-2/+0
2023-12-03disable a test that currently fails on big-endianRalf Jung-5/+9
2023-12-03also test directly calling simd_select_bitmaskRalf Jung-4/+39
2023-12-03also test simd_select_bitmask on arrays for less than 8 elementsRalf Jung-1/+6
2023-12-03Auto merge of #118567 - RalfJung:miri, r=RalfJungbors-2/+46
Miri subtree update r? `@ghost`
2023-12-03add simd_bswap and simd_bitreverseRalf Jung-0/+13
2023-12-03add simd_cttz and simd_ctlzRalf Jung-0/+5
2023-12-03simd_select_bitmask: support passing the mask as an arrayRalf Jung-0/+16
2023-12-03codegen, miri: fix computing the offset of an unsized field in a packed structRalf Jung-0/+73
2023-12-03Auto merge of #118487 - RalfJung:exposed-provenance, r=thomccbors-3/+3
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-8/+6
2023-11-30move exposed-provenance APIs into separate feature gate and explain the ↵Ralf Jung-3/+3
relationship of Exposed Provenance and Strict Provenance
2023-11-30give macOS some extra time, it needs thatRalf Jung-1/+1
2023-11-29explain tests that disable the provenance GCRalf Jung-0/+7
2023-11-28Remove Stacked Borrows GC heuristicsBen Kimock-1/+4
2023-11-26Update std::simd usage and test outputsCaleb Zulawski-8/+6
2023-11-23Merge from rustcThe Miri Conjob Bot-5/+1
2023-11-22Stabilize RFC3324 dyn upcasting coercionUrgau-5/+1
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
2023-11-21Merge from rustcRalf Jung-8/+10
2023-11-20Implement all 16 AVX compare operatorsEduardo Sánchez Muñoz-0/+162
`_mm_cmp_{ss,ps,sd,pd}` functions are AVX functions that use `llvm.x86.sse{,2}` prefixed intrinsics, so they were "accidentally" partially implemented when SSE and SSE2 intrinsics were implemented. The 16 AVX compare operators are now implemented and tested.
2023-11-20Test with -Zmiri-provenance-gc=1 on LinuxBen Kimock-1/+3
2023-11-19tag-gc -> provenance-gcBen Kimock-7/+7
2023-11-19Improve wording of `intrinsics-x86-*.rs` headerEduardo Sánchez Muñoz-4/+4
2023-11-18guarantee that char and u32 are ABI-compatibleRalf Jung-1/+5
2023-11-14Auto merge of #117330 - tmiasko:custom-mir-cleanup-blocks, r=cjgillotbors-1/+1
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-1/+1
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)`