Skip to content

Error: 'assertion failed: libc::CloseHandle(native) != 0' if integer is too high. #13589

Closed
@mdinger

Description

@mdinger

Code:

use std::io::println;

fn main() {

    for num in range(0, 100000) {
        spawn(proc() {
            for i in range(0,100000) {
                let x = i*i;
                }
        });
    }
}

Compile and run:

$ rustc hello.rs
...
$ hello.exe
task '<main>' failed at 'assertion failed: libc::CloseHandle(native) != 0', C:\b
ot\slave\dist2-win\build\src\libstd\rt\thread.rs:181

$

This works with 1,000 but not 100,000. I'm using Rust 0.10 on Win 7. I didn't try nightlies.

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