Theseus icon indicating copy to clipboard operation
Theseus copied to clipboard

Patch `owning_ref` to avoid (unused) unsoundness

Open kevinaboos opened this issue 3 years ago • 1 comments

See: https://github.com/Kimundi/owning-ref-rs/pull/78

We don't currently use the unsound functions, but it's a good idea to patch this nonetheless (in the root Cargo.toml's [patch] section).

kevinaboos avatar Jan 26 '22 23:01 kevinaboos

Could also consider replacing owning_ref with https://crates.io/crates/reffers

kevinaboos avatar Jan 26 '22 23:01 kevinaboos

I think we'll need to replace owning_ref entirely. Good candidates are:

  • self_cell: good but a bit limited
  • ouroboros: huge and perhaps too much build-time overhead
  • reffers: not as well-tested as others

kevinaboos avatar Oct 05 '22 21:10 kevinaboos

Note that all other RustSec advisory database warnings have been addressed. owning_ref is all that remains

kevinaboos avatar Oct 05 '22 21:10 kevinaboos

As an alternative and better solution, we no longer support using owning_ref anywhere in Theseus. All of the crates that use it have now been removed; all that's left is to remove it from various lock implementations that offer compatibility with it by implementing stable_deref_trait (e.g., MutexIrqSafe, MutexSleep and similar).

kevinaboos avatar Oct 31 '22 19:10 kevinaboos