-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Strange behaviour with multiple channels caused by illegal pattern-bindings #4718
Comments
I'm not sure if it helps, but this is on the master branch from the end of December. It doesn't look like there have been any big changes to pipes since then. |
The crashing thing seems to have just been from using |
Also, it only seems to affect |
This code is unsound because the |
I believe the &-patterns are a known soundness hole that allow copying noncopyables. Removing the infinite loop at the end causes the vector, which has illegal copies of the ports/chans in it, to double-destruct them. #3235 will make this illegal; closing. |
I would expect the following code: https://gist.github.com/4688550
to print (Left | Right): Some(0|1|2) in an infinite loop.
It only prints Some(0) and Some(2).
Removing the right channels causes Some(0), Some(1) and Some(2) to all be printed as expected.
Getting rid of the try_recv() on the right port doesn't get rid of the problem.
The text was updated successfully, but these errors were encountered: