Repository navigation
win errno codes - #2827
Merged
Merged
win errno codes#2827
Conversation
ehartford
force-pushed
the
win-errno-codes
branch
from
October 29, 2026 21:03
468746e to
7a20a78
Compare
#2773 made IoError.Os carry the Win32 code on Windows and its message the system's text, but the shared runtime still wrote POSIX errnos: read_file of a directory reported `-21` (EISDIR), which Win32 reads as ERROR_NOT_READY, "The device is not ready (os error 21)", and a short read `-5` (EIO), "Access is denied". The Windows backends had the same literals: -12 (ENOMEM) on a failed allocation is ERROR_INVALID_ACCESS, -22 (EINVAL) is ERROR_BAD_COMMAND, -5 on a short copy write and -21 on a refused directory link. - rt_core asks the platform for the two codes it reports (rt_err_is_dir, rt_err_short_read): EISDIR and EIO on POSIX and wasm (which already speaks POSIX numbers), ERROR_DIRECTORY_NOT_SUPPORTED (336) and ERROR_HANDLE_EOF (38) on Windows. - The Windows backends name WIN_ENOMEM (8), WIN_EWRITE (29), WIN_ESHORTREAD (38) and WIN_EISDIR (336) beside WIN_EINVAL and use them. - behav_fs_read_file_io_error asserts POSIX's text and codes, so it skips Windows; behav_fs_read_file_io_error_windows asserts Win32's, and that a directory never reads as "device is not ready". - behav_process_timeout_stops_child built `-o dir/probe` and ran `dir/probe`: `-o` names the file exactly, and Windows runs an extensionless name as its `.exe`, so the probe never started (probe.out empty, exit nonzero on win10). Both programs take `.exe` there, as behav_978 and behav_build_case_output_isolation do. Evidence (win10, cb98d27 battery): behav_fs_read_file_io_error failed at its POSIX text; a probe printed "dir: The device is not ready (os error 21)". The process test's directory held `probe` and no `probe.exe`.
ehartford
force-pushed
the
win-errno-codes
branch
from
October 29, 2026 21:12
7a20a78 to
b99e2d1
Compare
Contributor
Author
|
Seed-driven battery GREEN on the stack top b99e2d1 ( |
Contributor
Author
|
Windows (win10, windows-x86_64) battery on b99e2d1: behavior-tests (1998 files) and emit-c-smoke green, incl. behav_fs_read_file_io_error_windows, behav_process_timeout_stops_child and behav_1952_windows_walkers_junctions. The one red, runtime-generation-regression (and gate, which depends on it), is pre-existing on main (#2788 inventory); its cause is found (the native rt slot vs the windows_x86_64 cross slot, both selected for a native build) and is the next PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack created with GitHub Stacks CLI • Give Feedback 💬