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
The Lock API currently keeps the exposed internals alive longer than the lock is held (in particular, as long as the lifetime of the Scope the handle belongs to). This is unsound.
Since Handle is an auto-deref type, it should be possible to impl Lock for a borrowed reference to the target of the handle, instead of the handle itself, which should correctly bound the lifetime of the exposed internals.
But this also means that to trigger the auto-deref, we'll need to replace vm::lock with a method on Lock, so that it can be performed by a method call on the handle, which implicitly borrows the target.
The text was updated successfully, but these errors were encountered:
The Lock API currently keeps the exposed internals alive longer than the lock is held (in particular, as long as the lifetime of the Scope the handle belongs to). This is unsound.
Since Handle is an auto-deref type, it should be possible to impl Lock for a borrowed reference to the target of the handle, instead of the handle itself, which should correctly bound the lifetime of the exposed internals.
But this also means that to trigger the auto-deref, we'll need to replace
vm::lock
with a method onLock
, so that it can be performed by a method call on the handle, which implicitly borrows the target.The text was updated successfully, but these errors were encountered: