Skip to content

RUST_CC_ZEAL crash with box closure #1989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jruderman opened this issue Mar 15, 2012 · 2 comments
Closed

RUST_CC_ZEAL crash with box closure #1989

jruderman opened this issue Mar 15, 2012 · 2 comments
Assignees
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@jruderman
Copy link
Contributor

enum maybe_pointy {
    none,
    p(@pointy)
}

type pointy = {
    mut a : maybe_pointy,
    mut f : fn@()->(),
};

fn empty_pointy() -> @pointy {
    ret @{
        mut a : none,
        mut f : fn@()->(){},
    }
}

fn main()
{
    let v : [mut @pointy] = [mut];

    uint::range(0u, 2u) {|_i|
        v += [mut empty_pointy()];
    }

    v[0].a = p(v[0]);
}

Gives me a crash or

Assertion failed: (box->ref_count >= 1), function box_body_td, file ../src/rt/rust_shape.h, line 703.

Once this is fixed I'll run my CC mini-fuzzer again ;)

@ghost ghost assigned nikomatsakis Apr 13, 2012
@catamorphism
Copy link
Contributor

I ran into the same assertion failure reproducing #1469 and #1466.

@nikomatsakis
Copy link
Contributor

I believe this is now fixed.

celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants