Add random failures to compare_exchange_weak
In practice this is pretty useful for detecting bugs.
This fails more frequently than realistic (~~50%~~ (now 80%, controlled by a flag) of the time). I couldn't find any existing code that tries to model this (tsan, cdschecker, etc all seem to have TODOs there). Relacy models it with a 25% or 50% failure chance depending on some settings.
CC `@JCTyblaidd` who wrote the code this modifies initially, and seems interested in this subject.
Fix `\n` in Zulip message
https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Cron.20Job.20Failure/near/223865005:
> Dear `@**RalfJ**` and `@**oli**\n\nIt` would appear that the Miri cron job build failed. Would you mind investigating this issue?\n\nThanks in advance!\nSincerely,\nThe Miri Cronjobs Bot
This PR changes that to:
> Dear `@**RalfJ**` and `@**oli**`
>
> It would appear that the Miri cron job build failed. Would you mind investigating this issue?
>
> Thanks in advance!
> Sincerely,
> The Miri Cronjobs Bot
Add shim for libc::sysconf(libc::_SC_NPROCESSORS_CONF)
`libc::sysconf(libc::_SC_NPROCESSORS_CONF)` is used by AArch64 devices to get the number of CPUs in the `num_cpus` crate:
b423db0a69/src/lib.rs (L337-L342)
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.