about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2024-05-04make some tests not need output (so they work on wasm)Ralf Jung-10/+6
2024-05-04freebsd: test std threadname and fs APIsRalf Jung-0/+0
also reorder foreign_items to fix the grouping, and reorder the tests_minimal invocations to be more consistent
2024-05-04update 'unsupported' messageRalf Jung-20/+40
2024-05-04Rollup merge of #124293 - oli-obk:miri_intrinsic_fallback_body, r=RalfJungMatthias Krüger-0/+28
Let miri and const eval execute intrinsics' fallback bodies fixes https://github.com/rust-lang/miri/issues/3397 r? ``@RalfJung``
2024-05-04move intrinsics implementations and tests into dedicated folderRalf Jung-0/+0
and make them separate from 'shims'
2024-05-04rename integer testRalf Jung-0/+0
2024-05-04move available-parallelism tests into shims/ folderRalf Jung-0/+0
2024-05-04macos: use getentropy from libcRalf Jung-7/+0
2024-05-03Ensure miri only uses fallback bodies that have manually been vetted to ↵Oli Scherer-0/+28
preserve all UB that the native intrinsic would have
2024-04-28Remove direct dependencies on lazy_static, once_cell and byteorderGeorge Bateman-9/+13
The functionality of all three crates is now available in the standard library.
2024-04-26add test for concurrent env var accessRalf Jung-0/+8
2024-04-26Auto merge of #3516 - RalfJung:pathbuf, r=RalfJungbors-37/+60
add smoke tests for basic PathBuf interactions I wrote these while debugging [this](https://github.com/rust-lang/miri-test-libstd/actions/runs/8849912635/job/24302962983); it turns out the issue is [more complicated](https://github.com/rust-lang/rust/issues/124409) but these tests still seemed worth keeping.
2024-04-26add smoke tests for basic PathBuf interactionsRalf Jung-37/+60
2024-04-25debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and ↵Vadim Petrochenkov-2/+2
`#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local). `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
2024-04-25run many-seeds tests at least a few times on all tier 1 targetsRalf Jung-4/+17
2024-04-25add a test for the TLS memory leakRalf Jung-0/+13
2024-04-25fmtThe Miri Cronjob Bot-80/+149
2024-04-25Merge from rustcThe Miri Cronjob Bot-27/+26
2024-04-25Rollup merge of #124335 - ChrisDenton:stabilize-absolute, r=dtolnayMatthias Krüger-1/+0
Stabilize `std::path::absolute` FCP complete in https://github.com/rust-lang/rust/issues/92750#issuecomment-2075046985
2024-04-24Stabilize `std::path::absolute`Chris Denton-1/+0
2024-04-24Auto merge of #3492 - eduardosm:intrinsics-x86-avx2, r=oli-obkbors-0/+1613
Implement LLVM x86 AVX2 intrinsics
2024-04-24Fix miri testGary Guo-1/+1
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-25/+25
And suggest adding the `#[coroutine]` to the closure
2024-04-24Auto merge of #3507 - RalfJung:let-underscore, r=RalfJungbors-15/+15
avoid 'let _' in tests where we actually want the value to be computed
2024-04-24avoid 'let _' in tests where we actually want the value to be computedRalf Jung-15/+15
2024-04-24Auto merge of #3502 - RalfJung:GetUserProfileDirectoryW, r=RalfJungbors-1/+1
windows: basic support for GetUserProfileDirectoryW Fixes https://github.com/rust-lang/miri/issues/3499
2024-04-24windows: basic support for GetUserProfileDirectoryWRalf Jung-1/+1
2024-04-24Merge from rustcThe Miri Cronjob Bot-32/+118
2024-04-23Rollup merge of #124003 - WaffleLapkin:dellvmization, r=scottmcm,RalfJung,antoyoMatthias Krüger-2/+2
Dellvmize some intrinsics (use `u32` instead of `Self` in some integer intrinsics) This implements https://github.com/rust-lang/compiler-team/issues/693 minus what was implemented in #123226. Note: I decided to _not_ change `shl`/... builder methods, as it just doesn't seem worth it. r? ``@scottmcm``
2024-04-23Implement LLVM x86 AVX2 intrinsicsEduardo Sánchez Muñoz-0/+1613
2024-04-23chore: fix some typos in commentsforcedebug-2/+2
Signed-off-by: forcedebug <forcedebug@outlook.com>
2024-04-23Auto merge of #3493 - eduardosm:env-set, r=oli-obkbors-0/+7
Add `-Zmiri-env-set` to set environment variables without modifying the host environment This option allows to pass environment variables to the interpreted program without needing to modify the host environment (which may have undesired effects in some cases).
2024-04-23Merge from rustcThe Miri Cronjob Bot-3/+242
2024-04-23Rollup merge of #124220 - RalfJung:interpret-wrong-vtable, r=oli-obkMatthias Krüger-30/+116
Miri: detect wrong vtables in wide pointers Fixes https://github.com/rust-lang/miri/issues/3497. Needed to catch the UB that https://github.com/rust-lang/rust/pull/123572 will start exploiting. r? `@oli-obk`
2024-04-23Auto merge of #121801 - zetanumbers:async_drop_glue, r=oli-obkbors-0/+235
Add simple async drop glue generation This is a prototype of the async drop glue generation for some simple types. Async drop glue is intended to behave very similar to the regular drop glue except for being asynchronous. Currently it does not execute synchronous drops but only calls user implementations of `AsyncDrop::async_drop` associative function and awaits the returned future. It is not complete as it only recurses into arrays, slices, tuples, and structs and does not have same sensible restrictions as the old `Drop` trait implementation like having the same bounds as the type definition, while code assumes their existence (requires a future work). This current design uses a workaround as it does not create any custom async destructor state machine types for ADTs, but instead uses types defined in the std library called future combinators (deferred_async_drop, chain, ready_unit). Also I recommend reading my [explainer](https://zetanumbers.github.io/book/async-drop-design.html). This is a part of the [MCP: Low level components for async drop](https://github.com/rust-lang/compiler-team/issues/727) work. Feature completeness: - [x] `AsyncDrop` trait - [ ] `async_drop_in_place_raw`/async drop glue generation support for - [x] Trivially destructible types (integers, bools, floats, string slices, pointers, references, etc.) - [x] Arrays and slices (array pointer is unsized into slice pointer) - [x] ADTs (enums, structs, unions) - [x] tuple-like types (tuples, closures) - [ ] Dynamic types (`dyn Trait`, see explainer's [proposed design](https://github.com/zetanumbers/posts/blob/main/async-drop-design.md#async-drop-glue-for-dyn-trait)) - [ ] coroutines (https://github.com/rust-lang/rust/pull/123948) - [x] Async drop glue includes sync drop glue code - [x] Cleanup branch generation for `async_drop_in_place_raw` - [ ] Union rejects non-trivially async destructible fields - [ ] `AsyncDrop` implementation requires same bounds as type definition - [ ] Skip trivially destructible fields (optimization) - [ ] New [`TyKind::AdtAsyncDestructor`](https://github.com/zetanumbers/posts/blob/main/async-drop-design.md#adt-async-destructor-types) and get rid of combinators - [ ] [Synchronously undroppable types](https://github.com/zetanumbers/posts/blob/main/async-drop-design.md#exclusively-async-drop) - [ ] Automatic async drop at the end of the scope in async context
2024-04-22Add localtime_r shimtiif-0/+45
2024-04-21Add `-Zmiri-env-set` to set environment variables without modifying the host ↵Eduardo Sánchez Muñoz-0/+7
environment This option allows to pass environment variables to the interpreted program without needing to modify the host environment (which may have undesired effects in some cases).
2024-04-21Miri: detect wrong vtables in wide pointersRalf Jung-30/+116
2024-04-21the mir-validation ICE test behaves strangely on Windows hostsRalf Jung-3/+6
let's just disable it there, this code is not platform-dependent anyway
2024-04-20ensure the ICE-to-file logic does not affect our testRalf Jung-0/+1
2024-04-20re-bless testsRalf Jung-0/+2
2024-04-20Merge from rustcThe Miri Cronjob Bot-0/+31
2024-04-19Auto merge of #3475 - RalfJung:reduce-reuse-recycle, r=RalfJungbors-4/+144
Address reuse improvements and fixes - when an address gets reused, establish a happens-before link in the data race model - do not reuse stack addresses, and make the reuse rate configurable Fixes https://github.com/rust-lang/miri/issues/3450
2024-04-19make test not leak rustc crate hashRalf Jung-1/+2
2024-04-18when reusing an address, most of the time only reuse from the current threadRalf Jung-4/+81
2024-04-18when an address gets reused, establish a happens-before link in the data ↵Ralf Jung-0/+63
race model
2024-04-18Auto merge of #3484 - RalfJung:realloc, r=RalfJungbors-3/+27
make realloc with a size of zero fail Fixes https://github.com/rust-lang/miri/issues/2774
2024-04-18make realloc with a size of zero failRalf Jung-3/+27
2024-04-18when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var ↵Ralf Jung-0/+31
isolation
2024-04-18add test checking that we do run MIR validationRalf Jung-0/+42