Skip to content

malloc: *** error for object 0x10b5c62f8: pointer being freed was not allocated #13408

Closed
@carllerche

Description

@carllerche

The following code when compiled on rust master then executed crashes with the error: "malloc: *** error for object 0x10b5c62f8: pointer being freed was not allocated"

struct Foo<T>;

fn foo<T>() -> ~Foo<T> {
  ~Foo
}

fn crash<T>(_: Option<T>, _: &Foo<T>) {
}

pub fn main() {
  crash(None, foo::<&str>());
}

My rustc info:

rustc 0.11-pre (2db9700 2014-04-07 08:56:34 -0700)
host: x86_64-apple-darwin

Edit: I guess my rustc is a day out of date. I am pulling latest master to double check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions