-
Notifications
You must be signed in to change notification settings - Fork 2
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
This seems to be causing panics in tokio's linked_list #4
Comments
Thanks for the info! I'll fix this as soon as possible. |
Please double check whether the |
I'm publishing a new version which includes these changes, which fix:
However I also ran the crate through Miri, and the results seem to indicate further unsoundness issues, although where they're coming from isn't clear. I would have difficulty believing that they stem from the futures_timer crate or the code that I stole from futures_unordered. |
Here is the Miri output:
|
The patched version 0.1.10 is up now. I accidentally published 0.1.9 with breaking api changes to include changes suggested in another issue, so that version has also been yanked. If I include those changes, I suppose it'll be with a version 1.0. However, I suspect MappedFutures might be merged into FuturesUnordered by then, in which case this crate will have no further updates. |
Yeah it wasn't clear from the code snippet alone but that's a
That actually is a futures_timer bug, it was fixed in 3.0.3 with async-rs/futures-timer#66. |
You probably have a memory safety bug in the case where the destructor of the future panics. You should do this instead: *task.future.get() = None; This syntax will run the destructor of the previous value and then write |
Yeah that's my bad. But I'm going to open a bug against the rust documentation because I feel like I'm not the first or last person to make this mistake based on reading the drop_in_place docs. |
Ah, unfortunately the 0.1.10 fix includes
|
Version 0.1.12 is now published, and it:
I also ran miri now that futures-timer is updated, and no additional unsoundness was discovered. Thank you everyone for your assistance and for bringing these issues to my attention. |
EDIT: I've determined that this issue was specific to the PR branch which attempts to merge MappedFutures into the FuturesUnordered project. There was some divergence between the two, which introduced unsoundness into that PR, but which does not exist in this crate |
I opened a new issue here: #5 |
Correct. Leaky code is not great but preferable to unsound code. |
This crate really fills a hole my application needs, so thanks for making it.
I think !Unpin futures are inadvertently moved during
cancel()
calls here, and changing thattake()
todrop_in_place()
andwrite(None)
seems to fix it.See tokio-rs/tokio#6597
The link to this repository on crates.io is also broken.
The text was updated successfully, but these errors were encountered: