about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/dangling_pointers
AgeCommit message (Collapse)AuthorLines
2025-07-09miri: fix out-of-bounds error for ptrs with negative offsetsRalf Jung-0/+27
2025-06-27Update dangling_pointer_to_raw_pointer.rsleopardracer-1/+1
2025-06-07diagnostics: do not repeat the entire message in the span labelRalf Jung-20/+20
2025-04-30interpret: better error message for out-of-bounds pointer arithmetic and ↵Ralf Jung-33/+33
accesses
2024-10-21move strict provenance lints to new feature gate, remove old feature gatesRalf Jung-3/+0
2024-09-16Bump ui testOli Scherer-55/+55
2024-08-18stabilize raw_ref_opRalf Jung-1/+0
2024-08-01on a signed deref check, mention the right pointer in the errorRalf Jung-2/+2
2024-07-27improve dangling/oob errors and make them more uniformRalf Jung-22/+22
2024-07-14add test for intermediate reference in '&(*x).0 as *const i32'Ralf Jung-0/+40
2024-05-13offset, offset_from: allow zero-byte offset on arbitrary pointersRalf Jung-121/+0
2024-04-24avoid 'let _' in tests where we actually want the value to be computedRalf Jung-3/+3
2024-02-21rename ptr::invalid -> ptr::without_provenanceRalf Jung-2/+2
also introduce ptr::dangling matching NonNull::dangling
2024-01-02Allow unused tuple struct fields in Miri testsJake Goulding-1/+1
Otherwise the newly-detected dead code causes new output
2023-11-24Bless Miri testsNilstrieb-24/+24
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-30make sure we catch UB with _ pattern in various syntactic positionsRalf Jung-4/+81
2023-10-28fmtThe Miri Conjob Bot-1/+0
2023-10-27Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJungbors-0/+32
Allow partially moved values in match This PR attempts to unify the behaviour between `let _ = PLACE`, `let _: TY = PLACE;` and `match PLACE { _ => {} }`. The logical conclusion is that the `match` version should not check for uninitialised places nor check that borrows are still live. The `match PLACE {}` case is handled by keeping a `FakeRead` in the unreachable fallback case to verify that `PLACE` has a legal value. Schematically, `match PLACE { arms }` in surface rust becomes in MIR: ```rust PlaceMention(PLACE) match PLACE { // Decision tree for the explicit arms arms, // An extra fallback arm _ => { FakeRead(ForMatchedPlace, PLACE); unreachable } } ``` `match *borrow { _ => {} }` continues to check that `*borrow` is live, but does not read the value. `match *borrow {}` both checks that `*borrow` is live, and fake-reads the value. Continuation of ~https://github.com/rust-lang/rust/pull/102256~ ~https://github.com/rust-lang/rust/pull/104844~ Fixes https://github.com/rust-lang/rust/issues/99180 https://github.com/rust-lang/rust/issues/53114
2023-10-25Stabilize `[const_]pointer_byte_offsets`Maybe Waffle-4/+0
2023-10-24Add miri tests.Camille GILLOT-0/+32
2023-10-17fmtThe Miri Conjob Bot-2/+2
2023-10-15more precise error for 'based on misaligned pointer' caseRalf Jung-26/+31
2023-10-15don't UB on dangling ptr deref, instead check inbounds on projectionsRalf Jung-116/+141
2023-08-25Record allocation spans inside force_allocationBen Kimock-3/+62
2023-08-16on out-of-bounds error, show where the allocation was createdRalf Jung-2/+14
2023-08-11Include spans in use-after-free diagnosticsBen Kimock-5/+55
2023-08-01properly track why we checked whether a pointer is in-boundsRalf Jung-17/+43
also simplify the in-bounds checking in Miri's borrow trackers
2023-07-14remove compile-flags that are no longer neededRalf Jung-20/+7
2023-06-15Extend `unused_must_use` to cover block exprs许杰友 Jieyou Xu (Joe)-3/+3
2023-04-30Update MIRI compiletestsScott McMurray-3/+3
2023-04-21Actually keep `PlaceMention` if requested.Camille GILLOT-3/+5
2023-04-21Evaluate place expression in `PlaceMention`.Camille GILLOT-0/+26
2022-12-06Reintroduce the span printing in miri (plus point to spans where possible)Oli Scherer-17/+17
2022-12-06Remove now-redundant file/line info from const backtracesOli Scherer-18/+18
2022-09-21Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'Oli Scherer-0/+427
git-subtree-dir: src/tools/miri git-subtree-mainline: 3f3167fb59341ac3240ca1774f48e8c053219131 git-subtree-split: 75dd959a3a40eb5b4574f8d2e23aa6efbeb33573