Xfr is an atomic ring for processing memory-mapped frames.
Xfr is pronounced "exfer".
cargo test
cargo test --release
An atomic ring for processing memory-mapped frames.
License: Mozilla Public License 2.0
Xfr is an atomic ring for processing memory-mapped frames.
Xfr is pronounced "exfer".
cargo test
cargo test --release
Xfr will need to be able to run in no-std environments.
Right now miri
is not pleased with us.
WARNING: Do not attempt to just run cargo +nightly miri test
as this will run the base_xfer
which shleps 1M frames through a ring. This takes less than a second, even with debug compiled code, but it takes an undetermined amount of time and CPU under miri
. I gave up after 5 minutes and a toasty, battery drained laptop.
MIRIFLAGS=-Zmiri-disable-isolation cargo +nightly miri test ring_rollover
Finished test [unoptimized + debuginfo] target(s) in 0.01s
Running unittests (target/miri/aarch64-apple-darwin/debug/deps/xfr-dce907680d28ade4)
running 1 test
test tests::ring_rollover ... warning: thread support is experimental and incomplete: weak memory effects are not emulated.
error: Undefined Behavior: Data race detected between Read on Thread(id = 2) and Write on Thread(id = 1) at alloc364431 (current vector clock = VClock([30, 0, 20]), conflicting timestamp = VClock([0, 8]))
--> src/lib.rs:499:18
|
499 | Some(elements[i])
| ^^^^^^^^^^^ Data race detected between Read on Thread(id = 2) and Write on Thread(id = 1) at alloc364431 (current vector clock = VClock([30, 0, 20]), conflicting timestamp = VClock([0, 8]))
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: inside `<RingIterator<8_usize, 8_usize, 64_usize> as std::iter::Iterator>::next` at src/lib.rs:499:18
note: inside closure at src/lib.rs:868:23
--> src/lib.rs:868:23
|
868 | for fp in c.consumable() {
| ^^^^^^^^^^^^^^
= note: inside `std::sys_common::backtrace::__rust_begin_short_backtrace::<[closure@src/lib.rs:861:24: 886:10], ()>` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:122:18
= note: inside closure at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:498:17
= note: inside `<std::panic::AssertUnwindSafe<[closure@std::thread::Builder::spawn_unchecked_<[closure@src/lib.rs:861:24: 886:10], ()>::{closure#1}::{closure#0}]> as std::ops::FnOnce<()>>::call_once` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271:9
= note: inside `std::panicking::r#try::do_call::<std::panic::AssertUnwindSafe<[closure@std::thread::Builder::spawn_unchecked_<[closure@src/lib.rs:861:24: 886:10], ()>::{closure#1}::{closure#0}]>, ()>` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:492:40
= note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<[closure@std::thread::Builder::spawn_unchecked_<[closure@src/lib.rs:861:24: 886:10], ()>::{closure#1}::{closure#0}]>>` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:456:19
= note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<[closure@std::thread::Builder::spawn_unchecked_<[closure@src/lib.rs:861:24: 886:10], ()>::{closure#1}::{closure#0}]>, ()>` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:137:14
= note: inside closure at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:497:30
= note: inside `<[closure@std::thread::Builder::spawn_unchecked_<[closure@src/lib.rs:861:24: 886:10], ()>::{closure#1}] as std::ops::FnOnce<()>>::call_once - shim(vtable)` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
= note: inside `<std::boxed::Box<dyn std::ops::FnOnce()> as std::ops::FnOnce<()>>::call_once` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1854:9
= note: inside `<std::boxed::Box<std::boxed::Box<dyn std::ops::FnOnce()>> as std::ops::FnOnce<()>>::call_once` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1854:9
= note: inside `std::sys::unix::thread::Thread::new::thread_start` at /Users/ry/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:108:17
error: aborting due to previous error; 1 warning emitted
error: test failed, to rerun pass '--lib'
Right now clippy is displeased with us.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.