bors [Sun, 17 Jan 2021 16:28:34 +0000 (16:28 +0000)]
Auto merge of #1679 - hyd-dev:min-const-generics, r=RalfJung
Remove `#![feature(const_generics)]` and `#![allow(incomplete_features)]`
`#![feature(min_const_generics)]` has been [stabilized](https://github.com/rust-lang/rust/pull/79135), so I removed `#![feature(const_generics)]` and `#![allow(incomplete_features)]` (I assume Miri is not built by the beta bootstrap compiler so it's fine to just remove them).
The test [`tests/run-pass/specialization.rs` also has a `#![allow(incomplete_features)]` for `#![feature(specialization)]`](https://github.com/rust-lang/miri/blob/9949d9e4/tests/run-pass/specialization.rs#L1-L2). I think that can be removed and `#![feature(specialization)]` can be replaced with `#![feature(min_specialization)]`, but I'm not sure whether I should do that because it's a test. Feel free to ask me to remove it if it's fine to do so.
bors [Tue, 22 Dec 2020 11:54:05 +0000 (11:54 +0000)]
Auto merge of #1658 - RalfJung:forget, r=RalfJung
remove intrinsic that is now implemented in the rustc side
Since https://github.com/rust-lang/rust/pull/80040, we can rely on the pass introduced in https://github.com/rust-lang/rust/pull/79049 to lower away `forget`.
bors [Sun, 13 Dec 2020 19:50:57 +0000 (19:50 +0000)]
Auto merge of #1644 - JCTyblaidd:detect_race_with_alloc, r=RalfJung
More tests, fix issue 1643 and detect races with allocation.
Fixes #1643 by disabling race detection for V-Table memory, adds race detection between r/w & memory allocation, and adds more tests.
~~There is one unusual result in dealloc_read_race_stack_drop.rs, where the stack variable is read by thread 0 & thread 2 and so reports a race with thread 0, any ideas for the cause of the read on thread 0?~~ Fixed, bug with reporting the index a read race occured in correctly.
bors [Sun, 6 Dec 2020 19:12:16 +0000 (19:12 +0000)]
Auto merge of #1641 - JCTyblaidd:update_release_sequences, r=RalfJung
Weaken release sequences to match the C++20 memory model
See [Weaken Release Sequences](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0982r1.html), since the exception for relaxed writes on the same thread as a release write not blocking release sequences was removed in the C++20 memory model compared to the C11 memory model the paper was based on. The implementation can be updated and simplified to match this. [Rust is currently specified to use the C++20 memory model](https://doc.rust-lang.org/std/sync/atomic/index.html).
bors [Mon, 30 Nov 2020 11:40:43 +0000 (11:40 +0000)]
Auto merge of #1636 - RalfJung:rustup, r=oli-obk
remove miri-rustc-tests
`@oli-obk` I am not sure if anyone used this program in the last few years. There are no instructions for how to use it. So I think keeping it working is just a waste of time. It now fails to build:
```
error[E0046]: not all trait items implemented, missing: `visit_foreign_item`
--> src/bin/miri-rustc-tests.rs:36:17
|
36 | impl<'tcx, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'tcx> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `visit_foreign_item` in implementation
```
So I propose instead of me trying to figure out how to fix this, we just drop this ancient code.
bors [Sun, 29 Nov 2020 18:44:28 +0000 (18:44 +0000)]
Auto merge of #1617 - JCTyblaidd:data_race_detector, r=RalfJung
Add simple data-race detector
Partially fixes data-race detection, see #1372, based on Dynamic Race Detection for C++11
- This does not explore weak memory behaviour, only exploring one sequentially consistent ordering.
- Data-race detection is only enabled after the first thread is created, so should have minimal overhead for non-concurrent execution.
- ~~Does not attempt to re-use thread id's so creating and joining threads lots of time in an execution will result in the vector clocks growing in size and slowing down program execution~~ It does now
JCTyBlaidd [Sat, 28 Nov 2020 17:17:07 +0000 (17:17 +0000)]
Fix typos - looked into the papers handling of timestamps, after looking into it again, it seems the paper only increments the timestamp after release operations, so changed to approximation of that implementation.