Skip to content

fix(libc): translate native stream read errors - #14560

Open
Queuse wants to merge 6 commits into
boykopovar:mainfrom
Queuse:codex/stdio-read-errno-20261101
Open

Queuse wants to merge 6 commits into
boykopovar:mainfrom
Queuse:codex/stdio-read-errno-20261101

Conversation

@Queuse

@Queuse Queuse commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Translate newly reported host CRT errno in ordinary-stream fread, fgetc, getc_unlocked and fgets, including failure to flush pending output when switching an update stream to reading. An empty nonblocking pipe exposes Linux EAGAIN 11 where the guest expects 35. Preserve incoming guest errno when no new native error is reported, including EOF and sticky errors, and retain partial results, byte bounds and directory-error 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 0873e3d4e976d1b85790fac939e51bf2ab728abf, refreshed against main d63781e9ce826dd5445b35b91960bb576f4834ae.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/src/StandardStreams.cpp
PR 7081 core/libs/prx/libc/src/FileAndHeap.cpp
PR 7386 core/libs/tests/FileStreams.cpp
PR 7447 core/libs/prx/libc/src/FileAndHeap.cpp
PR 8150 core/libs/prx/libc/src/StandardStreams.cpp
core/libs/tests/FileStreams.cpp
PR 9526 core/libs/prx/libc/src/FileAndHeap.cpp
PR 10405 core/libs/prx/libc/src/FileAndHeap.cpp
core/libs/prx/libc/src/StandardStreams.cpp
PR 11621 core/libs/prx/libc/src/FileAndHeap.cpp
PR 11831 core/libs/prx/libc/src/FileAndHeap.cpp
core/libs/tests/FileStreams.cpp
PR 11848 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12036 core/libs/tests/FileStreams.cpp
PR 12057 core/libs/prx/libc/src/StandardStreams.cpp
core/libs/tests/FileStreams.cpp
PR 12184 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12271 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12292 core/libs/prx/libc/src/StandardStreams.cpp
PR 12560 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12598 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12682 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12688 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12700 core/libs/prx/libc/src/FileAndHeap.cpp
PR 12920 core/libs/prx/libc/src/StandardStreams.cpp
PR 12965 core/libs/prx/libc/src/FileAndHeap.cpp
PR 13119 core/libs/tests/FileStreams.cpp
PR 13828 core/libs/prx/libc/src/FileAndHeap.cpp
PR 14863 core/libs/prx/libc/src/StandardStreams.cpp
PR 14878 core/libs/prx/libc/src/StandardStreams.cpp
core/libs/tests/FileStreams.cpp

@Queuse
Queuse marked this pull request as ready for review November 4, 2026 23:44
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant