sanitize_standard_fds: Miri supports poll now#159961
Conversation
|
cc @rust-lang/miri |
|
r? @clarfonthey rustbot has assigned @clarfonthey. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
a36f0a9 to
a4caad8
Compare
| /// closed in the mean time. | ||
| fn test_unblock_after_socket_close() { | ||
| // MacOS behaves different (`read` errors with EBADFD when the file description is closed) | ||
| // MacOS behaves different (`read` errors with EBADF when the file description is closed) |
There was a problem hiding this comment.
Frustrated that these both are very similar errors that exist and mean slightly different things, but want to verify this is actually correct here. Based upon the Linux manual:
EBADF Bad file descriptor (POSIX.1-2001).
EBADFD File descriptor in bad state.
It feels like EBADFD is correct, but from what it seems, MacOS only has EBADF? And just want to verify this is correct since I'm not 100% sure.
There was a problem hiding this comment.
I only just realized that those two errors both exist and are different. I am fairly sure that we saw EBADF on macOS, not EBADFD, as EBADF is usually returned when calling read on a closed FD so that would make sense. Also as you say macOS doesn't even seem to have EBADFD. I don't have macOS machine so verifying this isn't entirely trivial and doesn't seem worth it.
There was a problem hiding this comment.
That's fair, then. My verification after poking around was the macos-errno crate which does indeed list EBADF and not EBADFD, so, I'll say that's good enough.
|
r=me minus one small note. |
|
@bors r+ |
…s, r=clarfonthey sanitize_standard_fds: Miri supports poll now However, so far it doesn't support it on the standard FDs (0..=2). So let's support those in poll and then remove a Miri special case in std.
…uwer Rollup of 8 pull requests Successful merges: - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`)
…uwer Rollup of 8 pull requests Successful merges: - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`)
…s, r=clarfonthey sanitize_standard_fds: Miri supports poll now However, so far it doesn't support it on the standard FDs (0..=2). So let's support those in poll and then remove a Miri special case in std.
…s, r=clarfonthey sanitize_standard_fds: Miri supports poll now However, so far it doesn't support it on the standard FDs (0..=2). So let's support those in poll and then remove a Miri special case in std.
…uwer Rollup of 14 pull requests Successful merges: - #158417 (Avoid ICE when cfg_eval recovers no item from derive input) - #159085 (Fix decoding attributes of `SyntheticCoroutineBody`) - #159554 (feat: Update method signature of int_from_ascii) - #159637 (Some place analysis tweaks) - #159649 (Normalize region obligations before regionck) - #159961 (sanitize_standard_fds: Miri supports poll now) - #159967 (rustc_target: callconv: mips64: Return structs with single f128 in FPRs) - #159253 (Add suggestions for using `#[export_name]` instead of `#[link_name]` on static) - #159804 (Expand docs for fs::metadata and fs::symlink_metadata) - #159821 (Update expect message using the recommended style in binary_heap module) - #159840 (Fix opaque type ICE in late lints under the next-generation trait solver) - #159956 (Fix observable intermediate state in `thread::add_spawn_hook`) - #159991 (std: make send_process_group_signal unsupported on VxWorks) - #159996 (Detect when a macro without exclamation mark uses square brackets)
However, so far it doesn't support it on the standard FDs (0..=2). So let's support those in poll and then remove a Miri special case in std.