about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2025-07-28lookup_link_section: support arrays of function pointersRalf Jung-8/+7
2025-07-28revert accidental changeRalf Jung-0/+4
2025-07-28Merge commit 'abd9cba5acbcc35fb4cc59ce25580fa1624b5571'Ralf Jung-21/+17
2025-07-27miri: for ABI mismatch errors, say which argument is the problemRalf Jung-21/+17
2025-07-27Merge pull request #4498 from RalfJung/genmc-buildRalf Jung-0/+27
Add support for building and linking against genmc
2025-07-27various minor adjustmentsRalf Jung-2/+1
2025-07-27Add support for building and linking against genmcPatrick-6-0/+28
2025-07-27call_function helper: dont ICE on return type mismatchesRalf Jung-0/+51
2025-07-25fix target jsonRalf Jung-1/+1
2025-07-25Merge ref 'b56aaec52bc0' from rust-lang/rustThe Miri Cronjob Bot-13/+7
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: b56aaec52bc0fa35591a872fb4aac81f606e265c Filtered ref: 12f5e3255df658296af9fc953d8c1ab79ba91ea3 This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-23Remove const deduplication from the interpreter.Camille GILLOT-13/+7
2025-07-22Merge from rustcThe Miri Cronjob Bot-11/+21
2025-07-22Rollup merge of #144080 - jieyouxu:realign, r=BoxyUwU许杰友 Jieyou Xu (Joe)-3/+7
Mitigate `#[align]` name resolution ambiguity regression with a rename Mitigates beta regression rust-lang/rust#143834 after a beta backport. ### Background on the beta regression The name resolution regression arises due to rust-lang/rust#142507 adding a new feature-gated built-in attribute named `#[align]`. However, unfortunately even [introducing new feature-gated unstable built-in attributes can break user code](https://www.github.com/rust-lang/rust/issues/134963) such as ```rs macro_rules! align { () => { /* .. */ }; } pub(crate) use align; // `use` here becomes ambiguous ``` ### Mitigation approach This PR renames `#[align]` to `#[rustc_align]` to mitigate the beta regression by: 1. Undoing the introduction of a new built-in attribute with a common name, i.e. `#[align]`. 2. Renaming `#[align]` to `#[rustc_align]`. The renamed attribute being `rustc_align` will not introduce new stable breakages, as attributes beginning with `rustc` are reserved and perma-unstable. This does mean existing nightly code using `fn_align` feature will additionally need to specify `#![feature(rustc_attrs)]`. This PR is very much a short-term mitigation to alleviate time pressure from having to fully fix the current limitation of inevitable name resolution regressions that would arise from adding any built-in attributes. Long-term solutions are discussed in [#t-lang > namespacing macro attrs to reduce conflicts with new adds](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/namespacing.20macro.20attrs.20to.20reduce.20conflicts.20with.20new.20adds/with/529249622). ### Alternative mitigation options [Various mitigation options were considered during the compiler triage meeting](https://github.com/rust-lang/rust/issues/143834#issuecomment-3084415277), and those consideration are partly reproduced here: - Reverting the PR doesn't seem very minimal/trivial, and carries risks of its own. - Rename to a less-common but aim-to-stabilization name is itself not safe nor convenient, because (1) that risks introducing new regressions (i.e. ambiguity against the new name), and (2) lang would have to FCP the new name hastily for the mitigation to land timely and have a chance to be backported. This also makes the path towards stabilization annoying. - Rename the attribute to a rustc attribute, which will be perma-unstable and does not cause new ambiguities in stable code. - This alleviates the time pressure to address *this* regression, or for lang to have to rush an FCP for some new name that can still break user code. - This avoids backing out a whole implementation. ### Review advice This PR is best reviewed commit-by-commit. - Commit 1 adds a test `tests/ui/attributes/fn-align-nameres-ambiguity-143834.rs` which demonstrates the current name resolution regression re. `align`. This test fails against current master. - Commit 2 carries out the renames and test reblesses. Notably, commit 2 will cause `tests/ui/attributes/fn-align-nameres-ambiguity-143834.rs` to change from fail (nameres regression) to pass. This PR, if the approach still seems acceptable, will need a beta-backport to address the beta regression.
2025-07-21Merge pull request #4481 from RalfJung/read-write-truncateOli Scherer-112/+273
non-deterministically truncate reads/writes
2025-07-21Auto merge of #144238 - jhpratt:rollup-xb8aida, r=jhprattbors-7/+679
Rollup of 8 pull requests Successful merges: - rust-lang/rust#144144 (tests: Skip supported-crate-types test on musl hosts) - rust-lang/rust#144159 (opt-dist: change build_dir field to be an actual build dir) - rust-lang/rust#144162 (Debug impls for DropElaborators) - rust-lang/rust#144189 (Add non-regression test for rust-lang/rust#144168) - rust-lang/rust#144216 (Don't consider unstable fields always-inhabited) - rust-lang/rust#144229 (Miri subtree update) - rust-lang/rust#144230 (Option::as_slice: fix comment) - rust-lang/rust#144235 (Fix run-make tests on musl hosts) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-21Merge from rustcThe Miri Cronjob Bot-4/+29
2025-07-20Rollup merge of #144229 - RalfJung:miri-sync, r=RalfJungJacob Pratt-7/+679
Miri subtree update r? `@ghost`
2025-07-20Update Miri TestsScott McMurray-8/+14
2025-07-20Rollup merge of #144190 - scottmcm:spanned-errors-in-mir-validation, r=RalfJungGuillaume Gomez-4/+10
Give a message with a span on MIR validation error It was handy to get a source+line link for rust-lang/rust#143833, even if it's just to the function and not necessarily to the statement. r? mir
2025-07-20Rollup merge of #144169 - RalfJung:type-id-fix, r=oli-obkMatthias Krüger-0/+19
interpret: fix TypeId pointers being considered data pointers Fixes https://github.com/rust-lang/miri/issues/4477 r? ````@oli-obk````
2025-07-20Merge from rustcThe Miri Cronjob Bot-34/+155
2025-07-19Give a message with a span on validation errorScott McMurray-4/+10
2025-07-19non-deterministically truncate reads/writesRalf Jung-112/+269
2025-07-19don't halt execution when we write to a read-only fileRalf Jung-0/+4
2025-07-19move and update test dependenciesRalf Jung-1/+675
2025-07-19bump ui_testRalf Jung-5/+3
2025-07-19Auto merge of #144166 - matthiaskrgr:rollup-wccepuo, r=matthiaskrgrbors-3/+3
Rollup of 10 pull requests Successful merges: - rust-lang/rust#141076 (fix Zip unsoundness (again)) - rust-lang/rust#142444 (adding run-make test to autodiff) - rust-lang/rust#143704 (Be a bit more careful around exotic cycles in in the inliner) - rust-lang/rust#144073 (Don't test panic=unwind in panic_main.rs on Fuchsia) - rust-lang/rust#144083 (miri sleep tests: increase slack) - rust-lang/rust#144092 (bootstrap: Detect musl hosts) - rust-lang/rust#144098 (Do not lint private-in-public for RPITIT) - rust-lang/rust#144103 (Rename `emit_unless` to `emit_unless_delay`) - rust-lang/rust#144108 (Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compiling) - rust-lang/rust#144115 (fix outdated comment) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-19interpret: fix TypeId pointers being considered data pointersRalf Jung-0/+19
2025-07-19Mitigate `#[align]` name resolution ambiguity regression with a renameJieyou Xu-3/+7
From `#[align]` -> `#[rustc_align]`. Attributes starting with `rustc` are always perma-unstable and feature-gated by `feature(rustc_attrs)`. See regression RUST-143834. For the underlying problem where even introducing new feature-gated unstable built-in attributes can break user code such as ```rs macro_rules! align { () => { /* .. */ }; } pub(crate) use align; // `use` here becomes ambiguous ``` refer to RUST-134963. Since the `#[align]` attribute is still feature-gated by `feature(fn_align)`, we can rename it as a mitigation. Note that `#[rustc_align]` will obviously mean that current unstable user code using `feature(fn_aling)` will need additionally `feature(rustc_attrs)`, but this is a short-term mitigation to buy time, and is expected to be changed to a better name with less collision potential. See <https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202025-07-17/near/529290371> where mitigation options were considered.
2025-07-18make native-lib support compile-time-optional, and centralize cfg usageRalf Jung-1/+1
2025-07-18Show the memory of uninit readsOli Scherer-77/+82
2025-07-17miri sleep tests: increase slackRalf Jung-3/+3
2025-07-17Report the range of uninit bytes in CTFE errorsOli Scherer-29/+145
2025-07-16Auto merge of #144019 - RalfJung:miri-sync, r=RalfJungbors-17/+271
Miri subtree update r? `@ghost`
2025-07-16Rollup merge of #143692 - RalfJung:miri-oob, r=oli-obkSamuel Tardieu-0/+53
miri: fix out-of-bounds error for ptrs with negative offsets r? ```````@oli-obk```````
2025-07-16Merge pull request #4459 from ibraheemdev/ibraheem/global-ctorRalf Jung-2/+48
Add support for global constructors (i.e. life before main)
2025-07-16minor tweaks and commentsRalf Jung-2/+5
2025-07-16Merge pull request #4456 from nia-e/trace-incorporate-eventsRalf Jung-0/+192
trace: incorporate events
2025-07-16hook up native-lib bitsNia Espera-0/+192
2025-07-15add test for global constructorsIbraheem Ahmed-0/+43
2025-07-15Merge pull request #4469 from Patrick-6/add-spinloop-hintsRalf Jung-15/+31
Add std::hint::spin_loop() to tests
2025-07-15Make spin function naming more consistentPatrick-6-17/+17
2025-07-15Add std::hint::spin_loop()Patrick-6-6/+22
2025-07-14Rollup merge of #143710 - joshtriplett:random-updates, r=joshtriplettSamuel Tardieu-1/+1
Updates to random number generation APIs Updates based on discussions about random number generation. - Add comment on `RandomSource::fill_bytes` about multiple calls, to allow efficient implementations for random sources that generate a word at a time. - Drop the `Random` trait in favor of `Distribution<T>`, which will let people make calls like random(1..=6), and which allows for future expansion to non-uniform distributions, as well as floating-point. (For now, this is only implemented for `RangeFull`, to get the interface in place. Subsequent PRs will implement it for other range types.)
2025-07-12./x test miri: fix cleaning the miri_ui directoryRalf Jung-0/+2
2025-07-11Update miri for change to random APIJosh Triplett-1/+1
2025-07-09miri: fix out-of-bounds error for ptrs with negative offsetsRalf Jung-0/+53
2025-07-06Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJungbors-0/+124
Specialize sleep_until implementation for unix (except mac) related tracking issue: https://github.com/rust-lang/rust/issues/113752 Supersedes https://github.com/rust-lang/rust/pull/118480 for the reasons see: https://github.com/rust-lang/rust/issues/113752#issuecomment-2902594469 Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
2025-07-06sleep_until: add clock_nanosleep support to Miridvdsk-0/+124
The clock_nanosleep support is there to allow code using `sleep_until` to run under Miri. Therefore the implementation is minimal. - Only the clocks REALTIME and MONOTONIC are supported. The first is supported simply because it was trivial to add not because it was needed for sleep_until. - The only supported flag combinations are no flags or TIMER_ABSTIME only. If an unsupported flag combination or clock is passed in this throws unsupported.
2025-07-05Merge from rustcRalf Jung-2/+2