about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2023-06-16Merge from rustcRalf Jung-9/+9
2023-06-15Extend `unused_must_use` to cover block exprs许杰友 Jieyou Xu (Joe)-9/+9
2023-06-15Merge from rustcOli Scherer-3/+3
2023-06-14update miri testThe 8472-3/+3
2023-06-12Auto merge of #2924 - RalfJung:rustup, r=RalfJungbors-11/+2
Rustup
2023-06-11Merge from rustcRalf Jung-11/+2
2023-06-10box_exclusive_violationNeven Villani-1/+48
2023-06-05Differentiate between explicit accesses and accesses inserted by TBNeven Villani-120/+120
2023-06-03Auto merge of #2887 - Vanille-N:tb-mut-transmute, r=RalfJungbors-118/+1641
TB: more fail tests (mostly shared with SB) Although it was not in the tests, `mem::transmute` works for `UnsafeCell -> &` as well. Draft: will also introduce more test cases for cases that fail. Draft: depends on the new error messages from #2888
2023-06-03miri compiletest: no longer allow some warnings in rustc test suiteRalf Jung-11/+2
2023-06-03Select more TB fail testsNeven Villani-118/+1641
- reorganize tests/ structure: {stacked,tree,both}_borrows - UnsafeCell transmutation (the one that should fail, i.e. transmute & -> UnsafeCell then try to write) - select TB pass tests from existing SB fail tests (and a version that fails TB) - many fail tests now shared * extra test for TB that parent write invalidates child reads * buggy_* tests now shared * tests for deep retagging (pass_invalid_shr_*) now shared * extra TB test that shared references are read-only * aliasing_mut{1,2,3,4} adapted to fail both * extra TB test that write to raw parent invalidates shared children * mut_exclusive_violation2 now shared * issue-miri-1050-2 revisions fix - deduplications
2023-06-03add unchecked_shl testRalf Jung-2/+25
2023-06-02Merge from rustcRalf Jung-5/+9
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-5/+5
2023-05-31Adjust tests for newly uplifted cast_ref_to_mut lintUrgau-0/+4
2023-05-31Auto merge of #2907 - RalfJung:rustup, r=RalfJungbors-1/+1
Rustup
2023-05-31Merge from rustcRalf Jung-1/+1
2023-05-31Auto merge of #2888 - Vanille-N:tb-diags, r=RalfJungbors-27/+9
TB diagnostics: avoid printing irrelevant events History contains some events that are relevant to the location but not useful to understand the error. We can make the selection of events more precise, from only "does it affect the location" to also "is it relevant for this kind of error" This is also the occasion to fix https://github.com/rust-lang/miri/pull/2867#issuecomment-1530065511 [Solved] Draft: find a way for blanks in the history to not be confusing, as with the current version the history can show the creation as `Reserved` then show where it transitioned from `Frozen` to `Disabled`, but it will say nothing of the `Reserved -> Frozen` leading up to it.
2023-05-29Update a MIRI fake-time test that this makes "faster"Scott McMurray-1/+1
2023-05-28Merge from rustcBen Kimock-23/+38
2023-05-27more precise filtering of eventsNeven Villani-27/+9
impl of is_relevant on transitions makes for much less noise in error messages Co-authored-by: Ralf Jung <post@ralfj.de>
2023-05-27Add support for nested panics to miriAmanieu d'Antras-23/+38
2023-05-26rustupBen Kimock-1/+1
2023-05-26Merge from rustcBen Kimock-12/+15
2023-05-25Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obkMichael Goulet-5/+8
Remove ExpnKind::Inlined. Suggested in https://github.com/rust-lang/rust/pull/111815#issuecomment-1561903339 r? ``@oli-obk``
2023-05-25Auto merge of #86844 - bjorn3:global_alloc_improvements, r=pnkfelixbors-7/+7
Support #[global_allocator] without the allocator shim This makes it possible to use liballoc/libstd in combination with `--emit obj` if you use `#[global_allocator]`. This is what rust-for-linux uses right now and systemd may use in the future. Currently they have to depend on the exact implementation of the allocator shim to create one themself as `--emit obj` doesn't create an allocator shim. Note that currently the allocator shim also defines the oom error handler, which is normally required too. Once `#![feature(default_alloc_error_handler)]` becomes the only option, this can be avoided. In addition when using only fallible allocator methods and either `--cfg no_global_oom_handling` for liballoc (like rust-for-linux) or `--gc-sections` no references to the oom error handler will exist. To avoid this feature being insta-stable, you will have to define `__rust_no_alloc_shim_is_unstable` to avoid linker errors. (Labeling this with both T-compiler and T-lang as it originally involved both an implementation detail and had an insta-stable user facing change. As noted above, the `__rust_no_alloc_shim_is_unstable` symbol requirement should prevent unintended dependence on this unstable feature.)
2023-05-25Manually add inlined frames in the interpreter stacktrace.Camille GILLOT-5/+8
2023-05-23Auto merge of #2901 - oli-obk:noisy, r=RalfJungbors-1/+0
Hide full miri command line in `./miri run-dep` fixes #2443
2023-05-23Hide full miri command line in `./miri run-dep`Oli Scherer-1/+0
2023-05-23Merge from rustcOli Scherer-10/+8
2023-05-23Rollup merge of #111756 - Urgau:rename_drop_forget_copy_ref_lints, r=fee1-deadDylan DPC-4/+4
Rename `{drop,forget}_{copy,ref}` lints to more consistent naming This PR renames previous uplifted lints in https://github.com/rust-lang/rust/pull/109732 to more consistent naming. I followed the renaming done [here](https://github.com/rust-lang/rust/issues/53224) and also advocated in this [clippy issue](https://github.com/rust-lang/rust-clippy/issues/2845): - `drop_copy` to `dropping_copy_types` - `forget_copy` to `forgetting_copy_types` - `drop_ref` to `dropping_references` - `forget_ref` to `forgetting_references`
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-1/+1
2023-05-21Rename `drop_copy` lint to `dropping_copy_types`Urgau-3/+3
2023-05-19Drive-by-cleanup: Don't emit `thir::ExprKind::NeverToAny` for `! -> !`Maybe Waffle-6/+4
2023-05-13support array return types in simd_bitmaskRalf Jung-0/+33
2023-05-13implement SIMD ptr castsRalf Jung-0/+12
2023-05-13fmt and fix lintRalf Jung-1/+0
2023-05-13Merge from rustcRalf Jung-0/+9
2023-05-12Auto merge of #111506 - RalfJung:miri, r=oli-obkbors-1/+5
update Miri and run mir-opt-level=4 tests in rustc CI so issues like https://github.com/rust-lang/rust/issues/111422 are caught before they land. r? `@oli-obk` due to the bootstrap changes
2023-05-12Auto merge of #2890 - oli-obk:ui_test, r=RalfJungbors-16/+47
Add `./miri run-dep` for running a file with test dependencies available fixes #2443
2023-05-12Document arguments and interesting flagsOli Scherer-1/+3
2023-05-12Auto merge of #109732 - Urgau:uplift_drop_forget_ref_lints, r=davidtwcobors-0/+9
Uplift `clippy::{drop,forget}_{ref,copy}` lints This PR aims at uplifting the `clippy::drop_ref`, `clippy::drop_copy`, `clippy::forget_ref` and `clippy::forget_copy` lints. Those lints are/were declared in the correctness category of clippy because they lint on useless and most probably is not what the developer wanted. ## `drop_ref` and `forget_ref` The `drop_ref` and `forget_ref` lint checks for calls to `std::mem::drop` or `std::mem::forget` with a reference instead of an owned value. ### Example ```rust let mut lock_guard = mutex.lock(); std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex // still locked operation_that_requires_mutex_to_be_unlocked(); ``` ### Explanation Calling `drop` or `forget` on a reference will only drop the reference itself, which is a no-op. It will not call the `drop` or `forget` method on the underlying referenced value, which is likely what was intended. ## `drop_copy` and `forget_copy` The `drop_copy` and `forget_copy` lint checks for calls to `std::mem::forget` or `std::mem::drop` with a value that derives the Copy trait. ### Example ```rust let x: i32 = 42; // i32 implements Copy std::mem::forget(x) // A copy of x is passed to the function, leaving the // original unaffected ``` ### Explanation Calling `std::mem::forget` [does nothing for types that implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html) since the value will be copied and moved into the function on invocation. ----- Followed the instructions for uplift a clippy describe here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751 cc `@m-ou-se` (as T-libs-api leader because the uplifting was discussed in a recent meeting)
2023-05-12Pass arguments to the interpreted program via `run-dep`Oli Scherer-44/+39
2023-05-12fmtRalf Jung-1/+3
2023-05-12Merge from rustcRalf Jung-37/+24
2023-05-11miri: Move patterns for simd testsJubilee Young-35/+17
It isn't clear to me why these error patterns do not trigger, but I am not going to waste time analyzing bugs in compiletest.
2023-05-11Remove a misleading part of a function nameOli Scherer-3/+3
2023-05-11Stop ignoring the `--manifest-path`Oli Scherer-2/+2
2023-05-11Bless miri testsbjorn3-6/+6
2023-05-11Fix fs miri test on AArch64bjorn3-1/+1