Skip to content

fix(doc): add safety notices to Sender::send and Arbiter::access #1050

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

Closed
wants to merge 3 commits into from

Conversation

Ddystopia
Copy link
Contributor

@Ddystopia Ddystopia commented Apr 2, 2025

Hello, those methods are technically unsound, because you can create the future, poll it, it will register the link to the queue, than you can core::mem::forget that future and return from the function, that will deallocate stack frame. But other links will still have those pointers, causing use after free and memory corruption.

@Ddystopia Ddystopia changed the title fix: add safety notices to Sender::send and Arbiter::access fix(doc): add safety notices to Sender::send and Arbiter::access Apr 2, 2025
@Ddystopia
Copy link
Contributor Author

Ddystopia commented Apr 2, 2025

Whoops, it's a mistake on my side, that link is not borrowed but owned by the future, thus pin guarantees do apply

@Ddystopia Ddystopia closed this Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant