Closed
Description
Tracking issue for fetch_nand
on integer atomics (it's stable for bool
).
On android, it appears that these functions give the wrong answer. See #12964 (comment) for some analysis, and the relevant logs are:
#[test]
fn uint_nand() {
let x = AtomicUint::new(0xf731);
assert_eq!(x.fetch_nand(0x137f, SeqCst), 0xf731);
assert_eq!(x.load(SeqCst), !(0xf731 & 0x137f));
}
#[test]
fn int_nand() {
let x = AtomicInt::new(0xf731);
assert_eq!(x.fetch_nand(0x137f, SeqCst), 0xf731);
assert_eq!(x.load(SeqCst), !(0xf731 & 0x137f));
}
---- sync::atomics::test::int_nand stdout ----
task 'sync::atomics::test::int_nand' failed at 'assertion failed: `(left == right) && (right == left)` (left: `78`, right: `-4914`)', /home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/sync/atomics.rs:1005
---- sync::atomics::test::uint_nand stdout ----
task 'sync::atomics::test::uint_nand' failed at 'assertion failed: `(left == right) && (right == left)` (left: `78`, right: `4294962382`)', /home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/sync/atomics.rs:977
Metadata
Metadata
Assignees
Labels
Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the library API team, which will review and decide on the PR/issue.In the final comment period and will be merged soon unless new substantive objections are raised.