Stream: wg-async-foundations

Topic: Possible unsoundness in `futures::Map`


Dylan MacKenzie (May 11 2019 at 19:03, on Zulip):

@Jake Goulding pointed out a possible error in the implementation of poll in future::Map on Stack Overflow. I responded that I thought that Map must add an F: Unpin bound to the poll implementation in order to be sound ( F is the type of the function passed to Map).

Does anyone with more knowledge of the pin API have an opinion on this? It feels like I'm missing something here.

Jake Goulding (May 11 2019 at 19:05, on Zulip):

@Nemo157 and I have also been discussing on Discord

Dylan MacKenzie (May 11 2019 at 19:14, on Zulip):

Hmm, so the guarantees of Pin<&X> do not necessarily apply to the fields of X unless it is possible to create a Pin referencing one of those fields.

Dylan MacKenzie (May 11 2019 at 19:18, on Zulip):

Someone else should go get that bounty :)

Jake Goulding (May 11 2019 at 19:25, on Zulip):

I encourage any and everyone to go for it :stuck_out_tongue_wink:

Taylor Cramer (May 13 2019 at 17:54, on Zulip):

F does not need to be Unpin

Taylor Cramer (May 13 2019 at 17:54, on Zulip):

Because it isn't pin-projected-to

Jake Goulding (May 13 2019 at 21:03, on Zulip):

@Taylor Cramer If you'd like to contribute an answer, that would be wonderful (https://stackoverflow.com/q/56058494/155423)

Taylor Cramer (May 13 2019 at 21:30, on Zulip):

unfortunately I don't have an SO account and don't have time to do that at the moment, but I can try and come back to it later

Last update: Nov 18 2019 at 00:50UTC