You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace main.rs with main.txt and rename it back to main.rs.
Open git bash
Run cargo run | cat
I expected to see this happen: my really long string gets printed twice, followed by a clean exit
Instead, this happened: some amount of my really long string gets printed, followed by: fatal runtime error: I/O error: operation failed to complete synchronously
Additional Details
The test case, while simple, does appear to have a minimum size requirement to trigger this crash. Shrinking the string will cause it to stop crashing.
I'm using cat in the steps for simplicity, but we've observed this happening with other programs at the end of the pipe too.
Redirecting to a file instead of a pipe seems to not trigger this crash.
Using cargo run is not necessary to trigger the crash, running the built executable directly also crashes.
Reproduction steps:
cargo new --bin somethingcargo run | catI expected to see this happen: my really long string gets printed twice, followed by a clean exit
Instead, this happened: some amount of my really long string gets printed, followed by:
fatal runtime error: I/O error: operation failed to complete synchronouslyAdditional Details
catin the steps for simplicity, but we've observed this happening with other programs at the end of the pipe too.cargo runis not necessary to trigger the crash, running the built executable directly also crashes.Filemethods #95469rustc -C helppanics (ICEs) when piped to a closed stdout #98700 (comment)Version it worked on
Version with regression
@rustbot modify labels: +regression-from-stable-to-stable +O-windows