-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
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
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.