Skip to content

memory leak in DiagnosticBuilder.into_diagnostic() #69600

Description

@dwrensha

This code leaks the Box at self.0:

unsafe {
diagnostic = std::ptr::read(&self.0.diagnostic);
std::mem::forget(self);
};

The leak was introduced in 2fcd870. cc @nnethercote

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions