about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail
AgeCommit message (Collapse)AuthorLines
2024-05-19make basic things work on AndroidRalf Jung-14/+0
2024-05-13offset, offset_from: allow zero-byte offset on arbitrary pointersRalf Jung-323/+2
2024-05-12further illumos/solaris support.David Carlier-1/+6
fixing part of `miri test alloc/hashmap`.
2024-05-09interpret/miri: better errors on failing offset_fromRalf Jung-0/+36
2024-05-08Use generic `NonZero`.Markus Reiter-20/+20
2024-05-08miri: rename intrinsic_fallback_checks_ub to intrinsic_fallback_is_specRalf Jung-15/+15
2024-05-04only show the 'basic API common for this target' message when this is a ↵Ralf Jung-24/+11
missing foreign function
2024-05-04bless and fmtRalf Jung-1/+2
2024-05-04Merge from rustcRalf Jung-0/+28
2024-05-04update 'unsupported' messageRalf Jung-14/+28
2024-05-04move intrinsics implementations and tests into dedicated folderRalf Jung-0/+0
and make them separate from 'shims'
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-25fmtThe Miri Cronjob Bot-1/+2
2024-04-25Merge from rustcThe Miri Cronjob Bot-2/+2
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-2/+2
And suggest adding the `#[coroutine]` to the closure
2024-04-24avoid 'let _' in tests where we actually want the value to be computedRalf Jung-4/+4
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-23Rollup merge of #124220 - RalfJung:interpret-wrong-vtable, r=oli-obkMatthias Krüger-9/+93
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-21Miri: detect wrong vtables in wide pointersRalf Jung-9/+93
2024-04-20Merge from rustcThe Miri Cronjob Bot-0/+15
2024-04-18when reusing an address, most of the time only reuse from the current threadRalf Jung-4/+78
2024-04-18when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var ↵Ralf Jung-0/+15
isolation
2024-04-17Merge from rustcRalf Jung-1/+1
2024-04-17Rollup merge of #124030 - RalfJung:adjust_alloc_base_pointer, r=oli-obkMatthias Krüger-1/+1
interpret: pass MemoryKind to adjust_alloc_base_pointer Another puzzle piece for https://github.com/rust-lang/miri/pull/3475. The 2nd commit renames base_pointer -> root_pointer; that's how Tree Borrows already calls them and I think the term is more clear than "base pointer". In particular, this distinguishes it from "base address", since a root pointer can point anywhere into an allocation, not just its base address. https://github.com/rust-lang/rust/pull/124018 has been rolled up already so I couldn't add it there any more. r? ```@oli-obk```
2024-04-17Auto merge of #3480 - RalfJung:alloc_error_handler, r=RalfJungbors-80/+100
directly call handle_alloc_error Also test more codepaths. There's like 5 different things that can happen on allocation failure! Between `-Zoom`, `#[alloc_error_handler]`, and `set_alloc_error_hook`, we have 3 layers of behavior overrides. It's all a bit messy. https://github.com/rust-lang/rust/pull/112331 seems intended to clean this up, but has not yet reached consensus.
2024-04-17tests/utils: add fmt::Write implementations for miri's native stdout/stderrRalf Jung-38/+21
2024-04-17alloc_error_handler tests: directly call handle_alloc_error; test more codepathsRalf Jung-59/+96
2024-04-17interpret: rename base_pointer -> root_pointerRalf Jung-1/+1
also in Miri, "base tag" -> "root tag"
2024-04-17Merge from rustcThe Miri Cronjob Bot-2/+2
2024-04-16Auto merge of #3478 - RalfJung:alloc_error_handler, r=RalfJungbors-0/+145
implement support for __rust_alloc_error_handler Fixes https://github.com/rust-lang/miri/issues/3439
2024-04-16implement support for __rust_alloc_error_handlerRalf Jung-0/+145
2024-04-16no_std works on Windows nowRalf Jung-4/+0
2024-04-16deadlock: show backtrace for all threadsRalf Jung-4/+4
2024-04-16Box::into_raw: make Miri understand that this is a box-to-raw castRalf Jung-2/+2
2024-04-16Miri: adopt to new intrinsic typesMaybe Waffle-2/+2
2024-04-06make 'missing extern static' error consistent with missing shimRalf Jung-9/+9
2024-04-06chore: fix some typosfindseat-1/+1
Signed-off-by: findseat <penglili@outlook.com>
2024-04-03rename `expose_addr` to `expose_provenance`joboet-2/+2
2024-04-02Rollup merge of #122935 - RalfJung:with-exposed-provenance, r=AmanieuJacob Pratt-6/+6
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066). The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".) The new name nicely matches `ptr::without_provenance`.
2024-03-29Auto merge of #122520 - scottmcm:stabilize_unchecked_math_basics, r=jhprattbors-8/+0
Stabilize `unchecked_{add,sub,mul}` Tracking issue: #85122 I think we might as well just stabilize these basic three. They're the ones that have `nuw`/`nsw` flags in LLVM. Notably, this doesn't include the potentially-more-complex or -more-situational things like `unchecked_neg` or `unchecked_shr` that are under different feature flags. To quote Ralf https://github.com/rust-lang/rust/issues/85122#issuecomment-1681669646, > Are there any objections to stabilizing at least `unchecked_{add,sub,mul}`? For those there shouldn't be any surprises about what their safety requirements are. *Semantially* these are [already available on stable, even in `const`, via](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bdb1ff889b61950897f1e9f56d0c9a36) `checked_*`+`unreachable_unchecked`. So IMHO we might as well just let people write them directly, rather than try to go through a `let Some(x) = x.checked_add(y) else { unsafe { hint::unreachable_unchecked() }};` dance. I added additional text to each method to attempt to better describe the behaviour and encourage `wrapping_*` instead. r? rust-lang/libs-api
2024-03-23Auto merge of #122952 - RalfJung:miri, r=RalfJungbors-11/+23
Miri subtree update r? `@ghost`
2024-03-23Auto merge of #3385 - Zoxc:read-types, r=RalfJungbors-11/+23
Report retags as distinct from real memory accesses for data races This changes the error reporting for data races such that reference invariants are no longer reported as real read and writes. Before: ``` Data race detected between (1) non-atomic write on thread `unnamed-6` and (2) non-atomic read on thread `unnamed-5` at alloc1034971+0x10c. (2) just happened here ``` After: ``` Data race detected between (1) non-atomic write on thread `unnamed-8` and (2) shared reference invariant on thread `unnamed-6` at alloc1018329+0x190. (2) just happened here ``` Non-atomic read accesses from the *other* thread don't have this information tracked so those are called `some potential non-atomic read access` here.
2024-03-23Report retags as distinct from real memory accesses for data racesJohn Kåre Alsaker-11/+23
2024-03-23Auto merge of #122582 - scottmcm:swap-intrinsic-v2, r=oli-obkbors-0/+78
Let codegen decide when to `mem::swap` with immediates Making `libcore` decide this is silly; the backend has so much better information about when it's a good idea. Thus this PR introduces a new `typed_swap` intrinsic with a fallback body, and replaces that fallback implementation when swapping immediates or scalar pairs. r? oli-obk Replaces #111744, and means we'll never need more libs PRs like #111803 or #107140
2024-03-23rename ptr::from_exposed_addr -> ptr::with_exposed_provenanceRalf Jung-6/+6
2024-03-18add_retag: ensure box-to-raw-ptr casts are preserved for MiriRalf Jung-2/+2
2024-03-17MIRI tests to confirm it's typedScott McMurray-0/+78
2024-03-17Auto merge of #121885 - reitermarkus:generic-nonzero-inner, ↵bors-4/+4
r=oli-obk,wesleywiser Move generic `NonZero` `rustc_layout_scalar_valid_range_start` attribute to inner type. Tracking issue: https://github.com/rust-lang/rust/issues/120257 r? `@dtolnay`
2024-03-14Remove `feature(unchecked_math)` from miriScott McMurray-8/+0
2024-03-10Fix `miri` tests.Markus Reiter-4/+4