Skip to content
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

Make FnPtrN: !Sync + !Send #42

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Make FnPtrN: !Sync + !Send #42

wants to merge 1 commit into from

Conversation

tov
Copy link
Owner

@tov tov commented Dec 20, 2021

This is intended to fix a soundness bug, the first item in #34, namely:

It erases all auto trait information attached to closure captures (read: Send and Sync)

The simplest fix is to make FnPtrN !Send and !Sync. This means we generally cannot pass our closures between threads, which may not be a satisfactory solution. An alternative PR I am working on will attempt to thread the auto traits from the original Rust closure through the Closure…N to the FnPtrN.

This is intended to fix a soundness bug, since `FnPtrN`s
come from closures that are !Sync + !Send.
@tov tov marked this pull request as draft December 20, 2021 19:47
@tov tov mentioned this pull request Dec 22, 2021
2 tasks
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