-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsoundness #18
Comments
Another bit of unsoundness I've found, |
Unfortunately, the pub fn get(&self) -> &mut T {
self.get_lock().lock();
let obj_ref = unsafe {
&mut *self.object_cell.get()
};
self.get_lock().unlock();
obj_ref
} The lock is taken, but the @GnomedDev If you have any other places you have seen unsoundness, please lave them in the comments because I am looking into them.
|
I would honestly recommend avoiding this library and simply writing bindings to whatever C API there is yourself. I haven't touched NX dev since I opened this issue though, so there may be much better options. |
The safe function
FileAccessor::read
takes aout_buf: *mut T
and from the documentation "Reads data in the given buffer". This should be unsafe as undefined behavior could be triggered by passing in a pointer not valid for writes.This was just the first thing I encountered that is obviously unsound in this library, it's usage of features directly marked as
incomplete_features
(eg: specialization) seems suspicious as well and should probably be removed if possible in my opinion and many other functions could be highly dangerous.Could a policy on safety be documented or a section added to README.md saying this library is highly in progress and currently has unsoundness/reliance on incomplete features?
The text was updated successfully, but these errors were encountered: