]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/concurrency/read_only_atomic_load.stderr
Auto merge of #102573 - RalfJung:mirisync, r=oli-obk
[rust.git] / src / tools / miri / tests / fail / concurrency / read_only_atomic_load.stderr
1 error: Undefined Behavior: atomic operations cannot be performed on read-only memory
2        many platforms require atomic read-modify-write instructions to be performed on writeable memory, even if the operation fails (and is hence nominally read-only)
3        some platforms implement (some) atomic loads via compare-exchange, which means they do not work on read-only memory; it is possible that we could have an exception permitting this for specific kinds of loads
4        please report an issue at <https://github.com/rust-lang/miri/issues> if this is a problem for you
5   --> $DIR/read_only_atomic_load.rs:LL:CC
6    |
7 LL |     x.load(Ordering::Relaxed);
8    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ atomic operations cannot be performed on read-only memory
9 many platforms require atomic read-modify-write instructions to be performed on writeable memory, even if the operation fails (and is hence nominally read-only)
10 some platforms implement (some) atomic loads via compare-exchange, which means they do not work on read-only memory; it is possible that we could have an exception permitting this for specific kinds of loads
11 please report an issue at <https://github.com/rust-lang/miri/issues> if this is a problem for you
12    |
13    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
14    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
15    = note: BACKTRACE:
16    = note: inside `main` at $DIR/read_only_atomic_load.rs:LL:CC
17
18 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
19
20 error: aborting due to previous error
21