Open
Description
Current behavior 😯
ItemSliceSync::get_mut()
takes an non-mutable reference and an index. It doesn't check if there are multiple callers accessing the same index, so that's left to the caller to do (the function is therefore marked unsafe
). I can't tell if the callers are actually guaranteed not to access the same index concurrently. My guess - without looking very carefully - is that the requirement can be violated by a bad packfile.
Expected behavior 🤔
Maybe ItemSliceSync should be replaced by a list of RefCell to make it safe?