about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/stacked_borrows
AgeCommit message (Collapse)AuthorLines
2025-06-16miri: bless testsDavid Wood-2/+2
These error messages include lines of the standard library which have changed and so need updated.
2025-06-07make better use of label for data-race and some other errorsRalf Jung-138/+37
2025-06-07diagnostics: do not repeat the entire message in the span labelRalf Jung-43/+43
2025-04-29add -Zmiri-deterministic-concurrency flag and use it for concurrency testsRalf Jung-4/+2
2025-04-29Added random schedulinggeetanshjuneja-2/+2
2024-10-21move strict provenance lints to new feature gate, remove old feature gatesRalf Jung-1/+0
2024-09-21fmt (with a huge diff for some reason)Ralf Jung-1/+1
2024-09-16Bump ui testOli Scherer-160/+160
2024-09-11make basic allocation functions track_caller in Miri for nicer backtracesRalf Jung-15/+8
2024-08-13remove the concept of a Call IDRalf Jung-6/+6
2024-04-18when reusing an address, most of the time only reuse from the current threadRalf Jung-2/+4
2024-04-03rename `expose_addr` to `expose_provenance`joboet-1/+1
2024-04-02Rollup merge of #122935 - RalfJung:with-exposed-provenance, r=AmanieuJacob Pratt-1/+1
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-23Report retags as distinct from real memory accesses for data racesJohn Kåre Alsaker-6/+12
2024-03-23rename ptr::from_exposed_addr -> ptr::with_exposed_provenanceRalf Jung-1/+1
2024-03-02print thread name in miri error backtracesRalf Jung-10/+10
2023-12-04use `assume(idx < self.len())` in `[T]::get_unchecked`bendn-16/+11
2023-11-30move exposed-provenance APIs into separate feature gate and explain the ↵Ralf Jung-1/+1
relationship of Exposed Provenance and Strict Provenance
2023-11-24Manual find replace updatesNilstrieb-2/+2
2023-11-24Bless Miri testsNilstrieb-42/+42
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-27data-race: preserve structured access information longer, and don't ↵Ralf Jung-6/+6
upper-case access types
2023-10-06Fix problems of Reserved -> FrozenNeven Villani-0/+50
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-1/+1
2023-08-05tree borrows: consider some retags as writes for the purpose of data racesRalf Jung-39/+34
2023-07-29Adjust some tests for invalid_reference_casting improvementsUrgau-0/+2
2023-07-21ask people to reach out if we declare too much UBRalf Jung-0/+2
2023-07-21SB: track whether a retag occurred nested inside a fieldRalf Jung-2/+2
2023-07-10Do not set up wrong span for adjustmentsMichael Goulet-4/+4
2023-06-18Merge from rustcRalf Jung-1/+1
2023-06-16remove box_free and replace with drop implDrMeepster-1/+1
2023-06-10box_exclusive_violationNeven Villani-71/+0
2023-06-03Select more TB fail testsNeven Villani-1164/+0
- 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-05-31Adjust tests for newly uplifted cast_ref_to_mut lintUrgau-0/+2
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-1/+1
2023-05-12Auto merge of #109732 - Urgau:uplift_drop_forget_ref_lints, r=davidtwcobors-0/+2
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-10Adjust tests for new drop and forget lintsUrgau-0/+2
2023-05-09Update to latest ui_test crate version.Oli Scherer-8/+8
Also stops using github actions groups that conflict with our groups as github does not nest them
2023-04-14Fix spellingJosh Soref-1/+1
* additional * addresses * aggregates * always * around * beginning * behaviours * borrows * called * canary * deallocated * determine * division * documentation * empty * endianness * ensures * existing * github * hygiene * individual * initialize * instantiate * library * location * miscellaneous * mitigates * needs * nonexistent * occurred * occurring * overridden * parameter * performable * previous * referential * requires * resolved * scenarios * semantics * spurious * structure * subtracting * suppress * synchronization * this * timestamp * to * transferring * unknown * variable * windows Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-16TB: select tests to run both TB and SBNeven Villani-1/+1
2023-02-06make &mut !Unpin not dereferenceableRalf Jung-54/+0
See https://github.com/rust-lang/unsafe-code-guidelines/issues/381 for discussion.
2023-01-02tweaks to retag diagnostic handlingRalf Jung-4/+4
2022-12-24fix warningsRalf Jung-2/+2
2022-12-24Merge from rustcRalf Jung-0/+101
2022-12-23Mention and number the components of a race in the order the interpreter ↵Ben Kimock-7/+7
sees them
2022-12-23attempt to clarify what the backtrace belongs to when there could be ambiguityRalf Jung-61/+61
2022-12-22Add a (1) and (2) to the data race errorsBen Kimock-8/+8
2022-12-21Fix phrasingBen Kimock-2/+2
2022-12-21Clean up implementation, deduplicate in errorsBen Kimock-16/+6
2022-12-21Don't run `Drop` terminators on types that do not have drop glue in const evalJakob Degen-2/+2
2022-12-21Bless testsJakob Degen-3/+3