You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rust_kernel has a facility for looking up a port by id and returning it refcounted so the port doesn't go away. But what stops the task from going away, making port->task invalid to somebody attempting to send on a channel associated with that port?
The text was updated successfully, but these errors were encountered:
Destroying a port involves 'detaching' it, after which there are supposed to be no references to it and it's not accessible via the kernel's port table, and a task can't die without destroying its ports.
There's an assert in rust_port::end_detach that checks that the port is not referenced. I have seen that assert fail in the past, though not recently.
This regression test ensures that issue rust-lang#2874 does not reoccur, which
was last encountered in commit 9190831.
Resolvesrust-lang#2874
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
---------
Co-authored-by: Jacob Salzberg <salzber@amazon.com>
Co-authored-by: Jaisurya Nanduri <91620234+jaisnan@users.noreply.github.com>
rust_kernel has a facility for looking up a port by id and returning it refcounted so the port doesn't go away. But what stops the task from going away, making port->task invalid to somebody attempting to send on a channel associated with that port?
The text was updated successfully, but these errors were encountered: