Skip to content

Aliasing &mut hiding behind trait objects #18262

Closed
@alexcrichton

Description

@alexcrichton

Looking at some cargo code today, I think that we have a soundness hole where we have multiple instances of a &mut pointer hiding behind trait objects:

What ends up happening is that each Box<Source + 'a> has a handle to the same &'a mut Config as well as the PackageRegistry having a handle on &'a mut Config. I don't think that's a sound thing to do!

I vaguely remember trying to reduce this awhile ago and was unable to, but I wanted to make sure that this was listed here!

Nominating as I think this may be a hole that needs plugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions