about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2025-01-30Check fixed arg number for variadic function.tiif-4/+67
2025-01-29Merge from rustcThe Miri Cronjob Bot-0/+35
2025-01-29Rollup merge of #136147 - RalfJung:required-target-features-check-not-add, ↵León Orell Valerian Liehr-2/+2
r=workingjubilee ABI-required target features: warn when they are missing in base CPU Part of https://github.com/rust-lang/rust/pull/135408: instead of adding ABI-required features to the target we build for LLVM, check that they are already there. Crucially we check this after applying `-Ctarget-cpu` and `-Ctarget-feature`, by reading `sess.unstable_target_features`. This means we can tweak the ABI target feature check without changing the behavior for any existing user; they will get warnings but the target features behave as before. The test changes here show that we are un-doing the "add all required target features" part. Without the full #135408, there is no way to take a way an ABI-required target feature with `-Ctarget-cpu`, so we cannot yet test that part. Cc ``@workingjubilee``
2025-01-28Rollup merge of #135748 - compiler-errors:len-2, r=RalfJung,oli-obkMatthias Krüger-0/+35
Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸 Change `Rvalue::RawRef` to take a `RawRefKind` instead of just a `Mutability`. Then introduce `RawRefKind::FakeForPtrMetadata` and use that for lowering index bounds checking to a `PtrMetadata`. This new `RawRefKind::FakeForPtrMetadata` acts like a shallow fake borrow in borrowck, which mimics the semantics of the old `Rvalue::Len` operation we're replacing. We can then use this `RawRefKind` instead of using a span desugaring hack in CTFE. cc ``@scottmcm`` ``@RalfJung``
2025-01-28ABI-required target features: warn when they are missing in base CPU (rather ↵Ralf Jung-2/+2
than silently enabling them)
2025-01-28Represent the raw pointer for a array length check as a new kind of fake borrowMichael Goulet-0/+35
2025-01-27Bump ui_testOli Scherer-6/+10
2025-01-27Avoid a bool and use an Option of ZST insteadOli Scherer-13/+23
2025-01-26make linux-futex test less flakyRalf Jung-3/+2
2025-01-26Merge from rustcThe Miri Cronjob Bot-3/+5
2025-01-25Auto merge of #133154 - estebank:issue-133137, r=wesleywiserbors-3/+5
Reword resolve errors caused by likely missing crate in dep tree Reword label and add `help`: ``` error[E0432]: unresolved import `some_novel_crate` --> f704.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` | = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml` ``` Fix #133137.
2025-01-25Merge from rustcThe Miri Cronjob Bot-2/+2
2025-01-24bless miri testWaffle Lapkin-2/+2
I'm not sure why the span improved but that's nice!
2025-01-24Reword "crate not found" resolve messageEsteban Küber-3/+5
``` error[E0432]: unresolved import `some_novel_crate` --> file.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` ``` On resolve errors where there might be a missing crate, mention `cargo add foo`: ``` error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From<nope::Thing> for Error { | ^^^^ use of unresolved module or unlinked crate `nope` | = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml` ```
2025-01-23fmtThe Miri Cronjob Bot-3/+0
2025-01-21Auto merge of #134299 - RalfJung:remove-start, r=compiler-errorsbors-57/+31
remove support for the (unstable) #[start] attribute As explained by `@Noratrieb:` `#[start]` should be deleted. It's nothing but an accidentally leaked implementation detail that's a not very useful mix between "portable" entrypoint logic and bad abstraction. I think the way the stable user-facing entrypoint should work (and works today on stable) is pretty simple: - `std`-using cross-platform programs should use `fn main()`. the compiler, together with `std`, will then ensure that code ends up at `main` (by having a platform-specific entrypoint that gets directed through `lang_start` in `std` to `main` - but that's just an implementation detail) - `no_std` platform-specific programs should use `#![no_main]` and define their own platform-specific entrypoint symbol with `#[no_mangle]`, like `main`, `_start`, `WinMain` or `my_embedded_platform_wants_to_start_here`. most of them only support a single platform anyways, and need cfg for the different platform's ways of passing arguments or other things *anyways* `#[start]` is in a super weird position of being neither of those two. It tries to pretend that it's cross-platform, but its signature is a total lie. Those arguments are just stubbed out to zero on ~~Windows~~ wasm, for example. It also only handles the platform-specific entrypoints for a few platforms that are supported by `std`, like Windows or Unix-likes. `my_embedded_platform_wants_to_start_here` can't use it, and neither could a libc-less Linux program. So we have an attribute that only works in some cases anyways, that has a signature that's a total lie (and a signature that, as I might want to add, has changed recently, and that I definitely would not be comfortable giving *any* stability guarantees on), and where there's a pretty easy way to get things working without it in the first place. Note that this feature has **not** been RFCed in the first place. *This comment was posted [in May](https://github.com/rust-lang/rust/issues/29633#issuecomment-2088596042) and so far nobody spoke up in that issue with a usecase that would require keeping the attribute.* Closes https://github.com/rust-lang/rust/issues/29633 try-job: x86_64-gnu-nopt try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: test-various
2025-01-21remove support for the #[start] attributeRalf Jung-57/+31
2025-01-20Rollup merge of #135333 - vayunbiyani:test-environment, r=RalfJungMatthias Krüger-85/+60
Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase Part of #132735: Replace `extern "rust-intrinsic"` with `#[rustc_intrinsic]` macro - Updated all instances of `extern "rust-intrinsic"` to use the `#[rustc_intrinsic]` macro. - Skipped `.md` files and test files to avoid unnecessary changes.
2025-01-20Updated several files to use rust intrinsic macros instead of the legacy ↵vayunbiyani-85/+60
extern "rust-intrinsic" blocks
2025-01-19fix location of pipe moduleRalf Jung-2/+3
2025-01-18Update tests for std::simd subtree syncCaleb Zulawski-21/+0
2025-01-15Merge from rustcThe Miri Cronjob Bot-6/+6
2025-01-13Included Abdroid to an epoll test targetsYoh Deadfall-1/+1
2025-01-13Illumos: Added epoll and eventfdYoh Deadfall-8/+13
2025-01-12Added Android to epoll and eventfd test targetsYoh Deadfall-3/+3
2025-01-12turns out Solarish targets support our entire test suiteRalf Jung-7/+4
2025-01-11Supported fioclex for ioctl on macosgeetanshjuneja-0/+32
2025-01-11avoid nesting the user-defined main so deeply on the stackRalf Jung-33/+9
2025-01-11use a single large catch_unwind in lang_startRalf Jung-10/+34
2025-01-10Switched FreeBSD to pthread_setname_npYoh Deadfall-30/+24
2025-01-03Merge from rustcThe Miri Cronjob Bot-0/+58
2025-01-01Try to write the panic message with a single `write_all` callJohn Kåre Alsaker-0/+58
2024-12-31Merge from rustcThe Miri Cronjob Bot-10/+60
2024-12-30Auto merge of #134757 - RalfJung:const_swap, r=scottmcmbors-10/+60
stabilize const_swap libs-api FCP passed in https://github.com/rust-lang/rust/issues/83163. However, I only just realized that this actually involves an intrinsic. The intrinsic could be implemented entirely with existing stable const functionality, but we choose to make it a primitive to be able to detect more UB. So nominating for `@rust-lang/lang` to make sure they are aware; I leave it up to them whether they want to FCP this. While at it I also renamed the intrinsic to make the "nonoverlapping" constraint more clear. Fixes #83163
2024-12-30fmtRalf Jung-2/+2
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
2024-12-27add test for close-while-blockedRalf Jung-0/+72
2024-12-25swap_typed_nonoverlapping: properly detect overlap even when swapping scalar ↵Ralf Jung-3/+25
values
2024-12-25rename typed_swap → typed_swap_nonoverlappingRalf Jung-12/+12
2024-12-25show an error on some invalid flag combinations: TB + permissive provenance; ↵Ralf Jung-8/+2
strict provenance + native calls
2024-12-25miri: add test for overlapping typed_swapRalf Jung-0/+28
2024-12-21Merge pull request #4090 from RalfJung/sc-testRalf Jung-204/+355
add more tests for SC access/fence consistency
2024-12-19add warning explaining the limitations of the native code modeRalf Jung-0/+36
2024-12-18Merge pull request #4072 from tiif/blockopOli Scherer-34/+232
Implement blocking unnamed_socket
2024-12-19Implement blocking unnamed_sockettiif-34/+232
2024-12-18add more tests for SC access/fence consistencyRalf Jung-204/+355
2024-12-15Merge from rustcThe Miri Cronjob Bot-12/+1
2024-12-14Rollup merge of #134181 - estebank:trim-render, r=oli-obkMatthias Krüger-12/+1
Tweak multispan rendering to reduce output length Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.
2024-12-13Fix miri testsEsteban Küber-12/+1
2024-12-13Merge from rustcThe Miri Cronjob Bot-4/+4
2024-12-13Stabilize async closuresMichael Goulet-4/+4