Skip to content

assertion failed: self.steals >= 0 #12295

Closed
@jedisct1

Description

@jedisct1

After a few seconds, the following code dies with an assertion (tested on OSX, rust -master a7aa4c4)

task '<unnamed>' failed at 'assertion failed: self.steals >= 0', /private/tmp/rust-3eWl/src/libstd/comm/stream.rs:215
task '<main>' failed at 'sending on a closed channel', /private/tmp/rust-3eWl/src/libstd/comm/mod.rs:368

use std::comm::{Chan, Port};
fn main() {
    let (port, chan): (Port<~str>, Chan<~str>) = Chan::new();
    spawn(proc() { loop  { port.recv(); } });
    loop  { chan.send(~"test"); }
}

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