ceph-rust
ceph-rust copied to clipboard
segfaults
To reproduce:
- Create a
Radosby connecting - Create an
IoCtxwithrados.get_rados_ioctx(pool_name) - Drop the
Rados - Use the
IoCtx-> segfaults
=> API is unsound.
rados.get_rados_ioctx(pool_name) should either have a lifetime bound on the Rados it takes as parameter (which is bothersome for some use-cases) or take self: &Arc<Rados> and store an Arc<Rados> inside (which considering how heavy ioctx is anyway wouldn't have a significant cost, so is probably the better option).