Skip to content

Error failed printing to stdout: Broken pipe (os error 32) when piping to head or similar commands #2618

@adpaco-aws

Description

@adpaco-aws

I tried this code:

#[kani::proof]
fn dummy() {
    assert!(1 + 1 == 2);
}

using the following command line invocation:

 kani dummy-file.rs | head -n 1

with Kani version: 0.32.0

I expected to see this happen: All lines filtered except for the first one

Instead, this happened:

thread '<unnamed>' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:1019:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Looks like this affects many Rust projects, see rust-lang/rust#46016

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] BugThis is a bug. Something isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions