Repository navigation
fix(libc): translate native stream write errors - #14559
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
I checked the failed Windows relinker job on I reran those four tests serially on Windows against the same source tree: 4/4 pass, taking 3.28, 7.74, 2.69 and 5.16 seconds. I also rebuilt libc and reran Could a maintainer rerun the failed Windows relinker job on this unchanged head? The hosted failure remains pending that rerun. Update: the current head is |
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
What
Translate newly reported host CRT errno in ordinary-stream
fwrite,fputs,fflush,fputcandputc_unlocked, including aliases and all-stream flush. A full nonblocking pipe exposes Linux EAGAIN 11 where the guest expects 35. Capture errors before status synchronization and preserve incoming guest errno when the native call reports no new error, including recovery while the stream error flag remains set. Preserve return values, partial element counts, validation and stream-mode handling.Rebased after #10324 merged, preserving main's stream-orientation calls. The agreed integration order is fulfilled; this change has no remaining runtime dependency.
Tested
Head
7a62af9976fa6d7ac8a96240f3e8686a609b95f4, refreshed against mainbf80054e7cf794320f656c93f3f299d55f336440.Windows 11 / WinLibs GCC 15.2.0 and Ubuntu WSL / GCC 15.2.0, glibc 2.43, Release: affected native library/dependency/test builds pass.
file_position,file_stream_status,file_streams,guest_standard_streamsandguest_fwidepass 5/5 on each OS.Linux independent checks against the produced libc module pass 56 actual-module cases: 37 writer-family and 19 block/flush controls, covering nonblocking errors, partial results, sticky errors and successful controls. Three focused native executables also pass as an unprivileged user in a temporary directory. POSIX pipe exhaustion is not run on Windows.
The original implementation exposes native 11 in the regression and independent negative controls; the correction reports guest 35.
The canonical check examined 1,940 open PRs and remains incomplete for feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, fix(libs): share Sony CRT handler and lconv state between libc and libSceAmpr #7081, feat(libc): scan 16-bit wide conversions on Linux #7386, feat(libc): support archive-backed stdio reads #7447, fix(libc): support character reads from random device streams #8150, feat(libc): add std::__sce_v2::_Random_device, _Fiopen and setw #9526, feat(libc): implement fcloseall with tracked stream lifetimes #11831, feat(libkernel): cancel blocked POSIX reads with owned operations #12682, fix(libkernel): preserve blocking sockets over nonblocking native transport #12688, feat(libkernel): cancel blocked POSIX writes with partial progress #12700, feat(libkernel): support deferred cancellation in POSIX accept #12965 and fix(relinker): match AppContent utility import to provider #13486 because those branches conflict with main. Eleven shared-file patches match previously reviewed changes after normalizing diff index abbreviations. The remaining feat(libc): implement fcloseall with tracked stream lifetimes #11831 changes concern close/reopen ownership and its fixtures, rather than this native error conversion. No duplicate conversion was found in the compared paths. The refreshed read/write branches merge cleanly with each other; the read fixture retains its separate include/call insertion points.
Hosted Build run 42124454347 on this head passes the relinker matrix/ASan and the Windows changed-guest build/test (
file_streams, 1/1). The full product build/suite and Linux runtime job were skipped; this is not full-product CI validation.Conventions and whitespace checks pass. No title, console, GPU, full-product or performance result is claimed.
Windows follow-up: JJenkx tested this head merged onto main
3926edb1bb, on Windows 11 Enterprise 22621 / WinLibs GCC 15.2 UCRT, Release.file_streamspassed three runs without skips. These are the contributor's results.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)