about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2025-09-13Rollup merge of #145471 - rs-sac:extr, r=the8472Jacob Pratt-1/+0
Stabilize BTree{Map,Set}::extract_if Tracking issue: rust-lang/rust#70530 FCP completed: https://github.com/rust-lang/rust/issues/70530#issuecomment-3191454465 Closes: rust-lang/rust#70530
2025-09-11Auto merge of #145177 - joboet:move-pal-thread, r=ibraheemdevbors-24/+24
std: move `thread` into `sys` Part of https://github.com/rust-lang/rust/issues/117276.
2025-09-10bless miri testsjoboet-24/+24
2025-09-10Rollup merge of #146178 - folkertdev:static-align, ↵Matthias Krüger-0/+14
r=jdonszelmann,ralfjung,traviscross Implement `#[rustc_align_static(N)]` on `static`s Tracking issue: https://github.com/rust-lang/rust/issues/146177 ```rust #![feature(static_align)] #[rustc_align_static(64)] static SO_ALIGNED: u64 = 0; ``` We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`. r? `@traviscross`
2025-09-09allow `#[rustc_align_static(N)]` on `static`sFolkert de Vries-0/+14
We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`.
2025-09-06Change stdlib float tests to account for miri nondet floats.LorrensP-2158466-4/+3
2025-09-06Implement nondet behaviour and change/add tests.LorrensP-2158466-44/+110
2025-09-04Rollup merge of #145690 - sayantn:integer-funnel-shift, r=tgross35Jacob Pratt-1/+51
Implement Integer funnel shifts Tracking issue: rust-lang/rust#145686 ACP: https://github.com/rust-lang/libs-team/issues/642 This implements funnel shifts on primitive integer types. Implements this for cg_llvm, with a fallback impl for everything else Thanks `@folkertdev` for the fixes and tests cc `@rust-lang/libs-api`
2025-09-03fix applying an error to infinitiesRalf Jung-0/+4
2025-09-03Add `funnel_sh{l,r}` functions and intrinsicssayantn-1/+51
- Add a fallback implementation for the intrinsics - Add LLVM backend support for funnel shifts Co-Authored-By: folkertdev <folkert@folkertdev.nl>
2025-09-03Merge pull request #4558 from RalfJung/float-err-fixOli Scherer-4/+50
fix mangitude of applied float error
2025-09-03fix mangitude of applied float errorRalf Jung-4/+50
2025-09-03Merge ref '51ff895062ba' from rust-lang/rustThe Miri Cronjob Bot-88/+49
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 51ff895062ba60a7cba53f57af928c3fb7b0f2f4 Filtered ref: 5057370cda58bcaad24ea094ec11c8c01b24c2bc This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-02account for aarch64 windows oversleepingRalf Jung-1/+2
2025-09-02add a flag to always apply the maximum float errorRalf Jung-0/+23
2025-09-02improve process::abort rendering in Miri backtracesRalf Jung-88/+49
2025-09-01Merge ref '828e45ad11ce' from rust-lang/rustThe Miri Cronjob Bot-1/+1
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 828e45ad11ce4ab56dd64e93f1fb5dd8f0c0ae93 Filtered ref: 10ab51e1b1b8eadb430163bd78ef39c0721cfbf8 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-31Merge pull request #4466 from nia-e/native-structsRalf Jung-0/+232
native-lib: allow passing structs as arguments
2025-08-31some refactoring and cleanupRalf Jung-65/+62
2025-08-31native-lib: pass structs to native codeNia Espera-0/+235
2025-08-31Rollup merge of #144443 - WaffleLapkin:integer-target-pointer-width, r=NoratriebMatthias Krüger-1/+1
Make target pointer width in target json an integer r? Noratrieb cc `@RalfJung` (https://github.com/rust-lang/rust/pull/142352/files#r2230380120) try-job: x86_64-rust-for-linux
2025-08-30Merge ref 'e004014d1bf4' from rust-lang/rustThe Miri Cronjob Bot-1/+0
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: e004014d1bf4c29928a0f0f9f7d0964d43606cbd Filtered ref: d62798e442c1c6ec461725b87dacc87c285259c8 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-29Rollup merge of #145467 - Kivooeo:stabilize-strict_provenance_atomic_ptr, ↵Trevor Gross-1/+0
r=scottmcm Stabilize `strict_provenance_atomic_ptr` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/99108) and stabilises `AtomicPtr::{fetch_ptr_add, fetch_ptr_sub, fetch_byte_add, fetch_byte_sub, fetch_or, fetch_and, fetch_xor}` --- EDIT: FCP completed at https://github.com/rust-lang/rust/issues/99108#issuecomment-3168260347
2025-08-29Merge pull request #4371 from CraftSpider/duplicate-handle-testRalf Jung-6/+41
Add shim test for `DuplicateHandle`
2025-08-29Add duplicate handle test + make null lpTargetHandle an abort, not an ↵Rune Tynan-6/+41
unsupported.
2025-08-29unix read/write: fix zero-size handlingRalf Jung-5/+4
2025-08-27fix target-pointer-width in testsWaffle Lapkin-1/+1
2025-08-27Stabilize BTree{Map,Set}::extract_ifSidney Cammeresi-1/+0
2025-08-25Merge ref 'a1dbb443527b' from rust-lang/rustThe Miri Cronjob Bot-0/+12
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: a1dbb443527bd126452875eb5d5860c1d001d761 Filtered ref: e644bd7324c7e071785356fcaad5bd89e671366b This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-24Merge ref 'f6d23413c399' from rust-lang/rustThe Miri Cronjob Bot-0/+95
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f6d23413c399fb530be362ebcf25a4e788e16137 Filtered ref: fc132ae45e682a2556f99caed7bca9b8a2e909c8 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-23Rollup merge of #144531 - Urgau:int_to_ptr_transmutes, r=jackh726Jacob Pratt-0/+12
Add lint against integer to pointer transmutes # `integer_to_ptr_transmutes` *warn-by-default* The `integer_to_ptr_transmutes` lint detects integer to pointer transmutes where the resulting pointers are undefined behavior to dereference. ### Example ```rust fn foo(a: usize) -> *const u8 { unsafe { std::mem::transmute::<usize, *const u8>(a) } } ``` ``` warning: transmuting an integer to a pointer creates a pointer without provenance --> a.rs:1:9 | 158 | std::mem::transmute::<usize, *const u8>(a) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this is dangerous because dereferencing the resulting pointer is undefined behavior = note: exposed provenance semantics can be used to create a pointer based on some previously exposed provenance = help: if you truly mean to create a pointer without provenance, use `std::ptr::without_provenance_mut` = help: for more information about transmute, see <https://doc.rust-lang.org/std/mem/fn.transmute.html#transmutation-between-pointers-and-integers> = help: for more information about exposed provenance, see <https://doc.rust-lang.org/std/ptr/index.html#exposed-provenance> = note: `#[warn(integer_to_ptr_transmutes)]` on by default help: use `std::ptr::with_exposed_provenance` instead to use a previously exposed provenance | 158 - std::mem::transmute::<usize, *const u8>(a) 158 + std::ptr::with_exposed_provenance::<u8>(a) | ``` ### Explanation Any attempt to use the resulting pointers are undefined behavior as the resulting pointers won't have any provenance. Alternatively, `std::ptr::with_exposed_provenance` should be used, as they do not carry the provenance requirement or if the wanting to create pointers without provenance `std::ptr::without_provenance_mut` should be used. See [std::mem::transmute] in the reference for more details. [std::mem::transmute]: https://doc.rust-lang.org/std/mem/fn.transmute.html -------- People are getting tripped up on this, see https://github.com/rust-lang/rust/issues/128409 and https://github.com/rust-lang/rust/issues/141220. There are >90 cases like these on [GitHub search](https://github.com/search?q=lang%3Arust+%2Ftransmute%3A%3A%3Cu%5B0-9%5D*.*%2C+%5C*const%2F&type=code). Fixes https://github.com/rust-lang/rust-clippy/issues/13140 Fixes https://github.com/rust-lang/rust/issues/141220 Fixes https://github.com/rust-lang/rust/issues/145523 `@rustbot` labels +I-lang-nominated +T-lang cc `@traviscross` r? compiler
2025-08-24Allow `integer_to_ptr_transmutes` in testsUrgau-0/+12
2025-08-23Merge pull request #4540 from RalfJung/tb-refactorsRalf Jung-4/+36
tree borrows: refactor new-permission logic
2025-08-23tree borrows: refactor new-permission logicRalf Jung-4/+36
2025-08-22Merge pull request #4538 from RalfJung/zst-reborRalf Jung-1/+21
add some ZST reborrow tests
2025-08-22miri: also detect aliasing of in-place argument and return placeRalf Jung-0/+95
2025-08-22add some ZST reborrow testsRalf Jung-1/+21
2025-08-22Merge ref '8e3710ef31a0' from rust-lang/rustThe Miri Cronjob Bot-1/+1
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 8e3710ef31a0b2cdf5a1c2f3929b7735d1e28c20 Filtered ref: 3629e47f19f1c1c9710f45b80a31eb32d851baf6 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-21Rollup merge of #145137 - Kmeakin:km/optimize-slice-index-panicking, r=jhprattJacob Pratt-1/+1
Consolidate panicking functions in `slice/index.rs` Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`. Split off from https://github.com/rust-lang/rust/pull/145024
2025-08-21Auto merge of #145647 - RalfJung:miri, r=RalfJungbors-0/+93
miri subtree update Subtree update of `miri` to https://github.com/rust-lang/miri/commit/980da679e4da038a723c56b2af892ff7ea0209fc. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-08-21Consolidate panicking functions in `slice/index.rs`Karl Meakin-1/+1
Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`.
2025-08-21Merge ref '125ff8a788c5' from rust-lang/rustThe Miri Cronjob Bot-0/+23
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 125ff8a788c5d6a66917f499abdc00051afe6886 Filtered ref: bcbe2eb9c674ba7e35befb4557f33a1956964256 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-20Bump slab from 0.4.10 to 0.4.11 in /tests/depsdependabot[bot]-2/+2
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11. - [Release notes](https://github.com/tokio-rs/slab/releases) - [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11) --- updated-dependencies: - dependency-name: slab dependency-version: 0.4.11 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20bless new testsRalf Jung-0/+1
2025-08-20Merge ref 'f605b57042ff' from rust-lang/rustThe Miri Cronjob Bot-37/+129
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f605b57042ffeb320d7ae44490113a827139b766 Filtered ref: c69d2743ed4676c4529ebb60b258f6c1273c9145 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-20make `prefetch` intrinsics safeFolkert de Vries-14/+14
2025-08-19add a fallback implementation for the `prefetch_*` intrinsicsFolkert de Vries-0/+23
The fallback is to just ignore the arguments. That is a valid implementation because this intrinsic is just a hint. I also added `miri::intrinsic_fallback_is_spec` annotation, so that miri now supports these operations. A prefetch intrinsic call is valid on any pointer.
2025-08-19Support weak definitionsbjorn3-0/+39
When a symbol only has a weak definition, this definition will be picked. When a symbol has both a weak and a regular definition, the regular definition will be picked instead.
2025-08-19God bless the testsJohannes Hostert-0/+53
2025-08-19Rollup merge of #145585 - RalfJung:miri-inplace-arg-checks, r=compiler-errors许杰友 Jieyou Xu (Joe)-37/+129
Miri: fix handling of in-place argument and return place handling This fixes two separate bugs (in two separate commits): - If the return place is `_local` and not `*ptr`, we didn't always properly protect it if there were other pointers pointing to that return place. - If two in-place arguments are *the same* local variable, we didn't always detect that aliasing.