about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/both_borrows
AgeCommit message (Collapse)AuthorLines
2025-09-22TB: rename Active → Unique to match paperRalf Jung-4/+4
2025-09-17Merge ref '3f1552a273e4' from rust-lang/rustThe Miri Cronjob Bot-6/+10
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 3f1552a273e43e15f6ed240d00e1efdd6a53e65e Filtered ref: fbfa7b30a3ad5abd6a5db7e3ef15adc8da1ecc37 Upstream diff: https://github.com/rust-lang/rust/compare/9d82de19dfae60e55c291f5f28e28cfc2c1b9630...3f1552a273e43e15f6ed240d00e1efdd6a53e65e This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-11Fix miri issue 4579 by checking if the strong protector is actually "active".Johannes Hostert-65/+0
Where "active" means that the accessed bit is set. This also reverts miri PR 3831.
2025-09-10interpret: fix overlapping aggregate initializationRalf Jung-6/+10
2025-08-19God bless the testsJohannes Hostert-0/+29
2025-06-07make better use of label for data-race and some other errorsRalf Jung-65/+18
2025-06-07diagnostics: do not repeat the entire message in the span labelRalf Jung-66/+66
2025-05-03Merge from rustcThe Miri Cronjob Bot-9/+9
2025-04-30interpret: better error message for out-of-bounds pointer arithmetic and ↵Ralf Jung-9/+9
accesses
2025-04-29add -Zmiri-deterministic-concurrency flag and use it for concurrency testsRalf Jung-3/+1
2025-04-29Added random schedulinggeetanshjuneja-1/+1
2025-03-12Allow more top-down inlining for single-BB calleesScott McMurray-2/+2
This means that things like `<usize as Step>::forward_unchecked` and `<PartialOrd for f32>::le` will inline even if we've already done a bunch of inlining to find the calls to them.
2024-09-21fmt (with a huge diff for some reason)Ralf Jung-2/+2
2024-09-16Bump ui testOli Scherer-287/+287
2024-09-11make basic allocation functions track_caller in Miri for nicer backtracesRalf Jung-21/+11
2024-08-27Make TB tree traversal bottom-upJohannes Hostert-117/+39
In preparation for #3837, the tree traversal needs to be made bottom-up, because the current top-down tree traversal, coupled with that PR's changes to the garbage collector, can introduce non-deterministic error messages if the GC removes a parent tag of the accessed tag that would have triggered the error first. This is a breaking change for the diagnostics emitted by TB. The implemented semantics stay the same.
2024-08-21add a test for zero-sized protectorsRalf Jung-0/+70
2024-08-13remove the concept of a Call IDRalf Jung-18/+18
2024-08-01on a signed deref check, mention the right pointer in the errorRalf Jung-4/+4
2024-07-27improve dangling/oob errors and make them more uniformRalf Jung-9/+9
2024-04-24avoid 'let _' in tests where we actually want the value to be computedRalf Jung-1/+1
2024-04-18when reusing an address, most of the time only reuse from the current threadRalf Jung-0/+2
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-17interpret: rename base_pointer -> root_pointerRalf Jung-1/+1
also in Miri, "base tag" -> "root tag"
2024-04-16Box::into_raw: make Miri understand that this is a box-to-raw castRalf Jung-2/+2
2024-03-23Auto merge of #3385 - Zoxc:read-types, r=RalfJungbors-5/+11
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-5/+11
2024-03-18add_retag: ensure box-to-raw-ptr casts are preserved for MiriRalf Jung-2/+2
2024-03-02Tree Borrows: print where the forbidden access happens; make tag tracking ↵Ralf Jung-56/+56
less verbose
2024-03-02print thread name in miri error backtracesRalf Jung-7/+7
2024-01-02Allow unused tuple struct fields in Miri testsJake Goulding-2/+2
Otherwise the newly-detected dead code causes new output
2023-11-24Bless Miri testsNilstrieb-62/+62
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-27data-race: preserve structured access information longer, and don't ↵Ralf Jung-5/+5
upper-case access types
2023-10-06Fix problems of Reserved -> FrozenNeven Villani-89/+15
Reserved loses permissions too quickly. Adding more fine-grained behavior of Reserved lets it lose write permissions only temporarily. Protected tags receive a read access on initialized locations.
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-4/+4
2023-08-16on out-of-bounds error, show where the allocation was createdRalf Jung-2/+12
2023-08-05tree borrows: consider some retags as writes for the purpose of data racesRalf Jung-0/+157
2023-08-02Auto merge of #112431 - Urgau:cast_ref_to_mut_improvments, r=Nilstriebbors-0/+2
Improve `invalid_reference_casting` lint This PR is a follow-up to https://github.com/rust-lang/rust/pull/111567 and https://github.com/rust-lang/rust/pull/113422. This PR does multiple things: - First it adds support for deferred de-reference, the goal is to support code like this, where the casting and de-reference are not done on the same expression ```rust let myself = self as *const Self as *mut Self; *myself = Self::Ready(value); ``` - Second it does not lint anymore on SB/TB UB code by only checking assignments (`=`, `+=`, ...) and creation of mutable references `&mut *` - Thirdly it greatly improves the diagnostics in particular for cast from `&mut` to `&mut` or assignments - ~~And lastly it renames the lint from `cast_ref_to_mut` to `invalid_reference_casting` which is more consistent with the ["rules"](https://github.com/rust-lang/rust-clippy/issues/2845) and also more consistent with what the lint checks~~ *https://github.com/rust-lang/rust/pull/113422* This PR is best reviewed commit by commit. r? compiler
2023-07-29Auto merge of #114211 - RalfJung:miri, r=RalfJungbors-14/+14
update Miri r? `@ghost`
2023-07-29Adjust some tests for invalid_reference_casting improvementsUrgau-0/+2
2023-07-29Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstriebbors-1/+1
Rename and allow `cast_ref_to_mut` lint This PR is a small subset of https://github.com/rust-lang/rust/pull/112431, that is the renaming of the lint (`cast_ref_to_mut` -> `invalid_reference_casting`). BUT also temporarily change the default level of the lint from deny-by-default to allow-by-default until https://github.com/rust-lang/rust/pull/112431 is merged. r? `@Nilstrieb`
2023-07-28exract a perform_access, check read-read commutation exhaustivelyNeven Villani-14/+14
2023-07-26fix protectors so that all reads actually commuteNeven Villani-14/+14
2023-07-21ask people to reach out if we declare too much UBRalf Jung-2/+7
2023-07-21SB: track whether a retag occurred nested inside a fieldRalf Jung-5/+5
2023-07-21make full field retagging the defaultRalf Jung-7/+15
2023-07-13Rename cast_ref_to_mut lint to invalid_reference_castingUrgau-1/+1
2023-06-19bless new testsRalf Jung-2/+2
2023-06-10box_exclusive_violationNeven Villani-0/+118
2023-06-05Differentiate between explicit accesses and accesses inserted by TBNeven Villani-87/+87