libc: verify regular-file fpurge after wide-character pushback #28693
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-12-02T22:55:21Z.
What happens
On the Linux libc provider, a regular-file
fpurgereturns 0 afterungetwc(U+00E9), and the following wide read yields original file data. The same sequence without purge returns the pushed character.Title, test or build step
Standalone host fixture using the AnyPS5 libc exports with the guest calling convention. It opens a relative scratch file containing
abcdefin binary read mode.AnyPS5 commit
Linux Release main
b396d834cb05and PR #27537 head2f17db0b0606. The fixture verifies the loaded libc provider before each run.System
Arch Linux x86-64, kernel 7.3.6-arch1-2. CPU-only fixture.
Steps to reproduce
fopen. Reada,b,canddwithfgetwc.ungetwc(0x00e9)and check that it returns0x00e9.fgetwc. For a fresh run with the same setup, callfpurgefirst and check that it returns 0, then read twice.Log
b396d834cb05ec,d2f17db0b0606ec,dWhat was checked
The narrow control reads through
d, pushesQwithungetc, callsferror, then purges. It returnsd,eon main andQ,eon the PR head. The wide result is already present on main. The published console fixture covers one byte of pushback, so the expected wide-character behavior still needs console qualification. Review finding