Skip to content

Remove ebadf handling from stdio - #166117

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
ChrisDenton:ebadf
Nov 20, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
ChrisDenton:ebadf

Conversation

@ChrisDenton

@ChrisDenton ChrisDenton commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

But still ignore ebadf in println! and eprintln! macros.

We preserve the Windows behaviour of ignoring NUL handles.

Fixes #47271 (see #47271 (comment))

@rustbot rustbot added A-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) A-process Area: `std::process` (note: `std::env` is A-env) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 17, 2026
@rustbot

rustbot commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

r? @maxdexh

rustbot has assigned @maxdexh.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 38 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, maxdexh

@ChrisDenton ChrisDenton added the to-announce Announce this issue on triage meeting label Nov 17, 2026
@ChrisDenton
ChrisDenton force-pushed the ebadf branch 2 times, most recently from f173a7e to 129d296 Compare November 17, 2026 17:46
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@maxdexh

maxdexh commented Nov 18, 2026

Copy link
Copy Markdown
Member

Are we still in what is considered "early in a nightly cycle", or should we wait for the next?

@bors try jobs=test-x86_64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 18, 2026
Remove ebadf handling from stdio


try-job: test-x86_64-msvc-1
@ChrisDenton

Copy link
Copy Markdown
Member Author

Are we still in what is considered "early in a nightly cycle", or should we wait for the next?

Idk if that's particularly well defined but we have just had a release less than a week ago so I'm assuming so.

But cc @joshtriplett

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2026
@rust-bors

rust-bors Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 51b6fa5 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@ChrisDenton

Copy link
Copy Markdown
Member Author

Oh right, fixing the test for non-windows unfixed for windows...

@maxdexh

maxdexh commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

I have a dedicated sense for detecting when something is gonna break on windows. It's not very good but sometimes it works ^^

But still ignore EBADF in (e)println.
This used to be handled indirectly in std::stdio
@ChrisDenton

Copy link
Copy Markdown
Member Author

@bors try jobs=test-x86_64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 19, 2026
Remove ebadf handling from stdio


try-job: test-x86_64-msvc-1
@rust-bors

rust-bors Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 97631fe (97631fe4a80f726b51dfbfebe167a5162a8b9cb6)
Base parent: b0b6006 (b0b600668bb9b4a897e2299b0a44289d42276545)

@maxdexh maxdexh left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9222601 has been approved by maxdexh

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 19, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 19, 2026
Remove ebadf handling from stdio

But still ignore ebadf in `println!` and `eprintln!` macros.

We preserve the Windows behaviour of ignoring NUL handles.

Fixes rust-lang#47271 (see rust-lang#47271 (comment))
rust-bors Bot pushed a commit that referenced this pull request Nov 19, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #157721 (compiletest: Add testing for lint machinery at runtime)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166117 (Remove ebadf handling from stdio)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165971 (fix: non-deterministic temporary object paths in linker maps)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 19, 2026
Remove ebadf handling from stdio

But still ignore ebadf in `println!` and `eprintln!` macros.

We preserve the Windows behaviour of ignoring NUL handles.

Fixes rust-lang#47271 (see rust-lang#47271 (comment))
rust-bors Bot pushed a commit that referenced this pull request Nov 19, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #166078 (rustc_type_ir: Optimize `sub_root_lookup_table` by using `SsoHashMap`, not `HashMap`)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - #166117 (Remove ebadf handling from stdio)
 - #166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165971 (fix: non-deterministic temporary object paths in linker maps)
 - #166064 (Add const generic transmute min support)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 20, 2026
Remove ebadf handling from stdio

But still ignore ebadf in `println!` and `eprintln!` macros.

We preserve the Windows behaviour of ignoring NUL handles.

Fixes rust-lang#47271 (see rust-lang#47271 (comment))
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup of 21 pull requests

Successful merges:

 - #165707 (bootstrap: Make low priority the default)
 - #165716 (Refactor split_block in check_pointers to avoid Terminator: None)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - #166069 (bootstrap: fix keep-stage-std)
 - #166117 (Remove ebadf handling from stdio)
 - #166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165802 (Add CI workflow to publish backtrace after a push to main)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165906 (fix ICE when a forced keyword follows a parameter pattern)
 - #166064 (Add const generic transmute min support)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166158 (bump some tools' `toml` dependency)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)
 - #166210 (Avoid terminator: None in insert_direct_enum_check)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup of 20 pull requests

Successful merges:

 - #165716 (Refactor split_block in check_pointers to avoid Terminator: None)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - #166069 (bootstrap: fix keep-stage-std)
 - #166117 (Remove ebadf handling from stdio)
 - #166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165802 (Add CI workflow to publish backtrace after a push to main)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165906 (fix ICE when a forced keyword follows a parameter pattern)
 - #166064 (Add const generic transmute min support)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166158 (bump some tools' `toml` dependency)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)
 - #166210 (Avoid terminator: None in insert_direct_enum_check)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
@rust-bors
rust-bors Bot merged commit d82695b into rust-lang:main Nov 20, 2026
15 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup merge of #166117 - ChrisDenton:ebadf, r=maxdexh

Remove ebadf handling from stdio

But still ignore ebadf in `println!` and `eprintln!` macros.

We preserve the Windows behaviour of ignoring NUL handles.

Fixes #47271 (see #47271 (comment))
@ChrisDenton
ChrisDenton deleted the ebadf branch November 20, 2026 07:16
folkertdev pushed a commit to folkertdev/stdarch that referenced this pull request Nov 22, 2026
Rollup of 20 pull requests

Successful merges:

 - rust-lang/rust#165716 (Refactor split_block in check_pointers to avoid Terminator: None)
 - rust-lang/rust#165934 (Avoid using Terminator:None in simplify_cfg)
 - rust-lang/rust#166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - rust-lang/rust#166069 (bootstrap: fix keep-stage-std)
 - rust-lang/rust#166117 (Remove ebadf handling from stdio)
 - rust-lang/rust#166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - rust-lang/rust#165094 (reflection: doc attributes from adts, fields, and variants)
 - rust-lang/rust#165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - rust-lang/rust#165694 (view-types: make sure view types are !Sized)
 - rust-lang/rust#165802 (Add CI workflow to publish backtrace after a push to main)
 - rust-lang/rust#165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - rust-lang/rust#165906 (fix ICE when a forced keyword follows a parameter pattern)
 - rust-lang/rust#166064 (Add const generic transmute min support)
 - rust-lang/rust#166136 (Move ub_checks() inside the const_eval_select branch.)
 - rust-lang/rust#166158 (bump some tools' `toml` dependency)
 - rust-lang/rust#166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - rust-lang/rust#166176 (compiletest: Move all code out of the crate root)
 - rust-lang/rust#166185 (simd-test: Fix cfg syntax in the test macro)
 - rust-lang/rust#166194 (std: Unstably constify `std::process::abort`)
 - rust-lang/rust#166210 (Avoid terminator: None in insert_direct_enum_check)

Failed merges:

 - rust-lang/rust#166150 (Reflection: refactor Type and TypeKind)
 - rust-lang/rust#166160 (refactor CTFE-specific intrinsics to different file)
@workingjubilee workingjubilee added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) A-process Area: `std::process` (note: `std::env` is A-env) relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust's stdio should not ignore EBADF error on non-windows platforms

5 participants