-
Notifications
You must be signed in to change notification settings - Fork 13
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
Cancellation safety #1
Comments
Yes, this issue needs to be fixed in the future. One possible way is to call |
The data buffer is invalid once the drop function is called. |
I think it does. But I can't find proof in the UCX docs. |
This line requires a mutable exclusive access. But the completion callback may be called in another thread at any time. async-ucx/src/ucp/endpoint/mod.rs Line 131 in d382387
|
Oh in fact an immutable reference is enough, because the And it is also safe to get mutable reference here (but don't pass it out). Because both |
|
Worker::tag_recv
accepts&mut [MaybeUninit<u8>]
as a data buffer.async-ucx/src/ucp/endpoint/tag.rs
Lines 5 to 8 in d382387
However, a future can be cancelled(dropped) at any time. While the IO operation is still in progress, the data buffer may be used after free. It's an unsoundness issue.
The text was updated successfully, but these errors were encountered: