Skip to content

I/O error: operation failed to complete synchronously [Windows7,MinGW] #99090

Closed
@CosmicSpaceGoose

Description

@CosmicSpaceGoose

Program crashing with segfault when reading stdin

Code

use std::io;

fn main() {
    let mut buf = String::new();

    io::stdin()
        .read_line(&mut buf)
        .expect("Failed to read line");
}

Output

I/O error: operation failed to complete synchronously
Segmentation fault

Version where it works

rustc 1.61.0 (fe5b13d68 2022-05-18)
binary: rustc
commit-hash: fe5b13d681f25ee6474be29d748c65adcd91f69e
commit-date: 2022-05-18
host: x86_64-pc-windows-gnu
release: 1.61.0
LLVM version: 14.0.0

Version with regression

rustc 1.62.0 (a8314ef7d 2022-06-27)
binary: rustc
commit-hash: a8314ef7d0ec7b75c336af2c9857bfaf43002bfc
commit-date: 2022-06-27
host: x86_64-pc-windows-gnu
release: 1.62.0
LLVM version: 14.0.5

Might be important that it's a Windows7 without latest updates and MinGW.
MinGW gonna drop Win7 support 'til end of the year. What is the plan for rust in such case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions