Skip to content

stack closure leak #2270

Description

@thatmattbone

On my x86_64 linux box running the latest version of Rust from git (as of this morning):

fn main() {
    let bar: fn() = {|| };
    bar();
}

Causes a leak:

Unreclaimed object found at 0x1b5a6a0: ((), ())
leaked memory in rust main loop (1 objects)
leak: ./src/rt/memory_region.cpp:172: memory_region::~memory_region(): Assertion `false' failed.
Aborted

Obviously this isn't very useful code, but I was just getting started and playing around with closures when I came across it. This might be a dupe of #2036 but I'm not smart enough to know :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions